贵港吾悦商业管理有限公司多角色网上演练(吾悦广场)
 
 
 
 
 

25 lines
602 B

using AX.MessageSystem;
using UnityEngine;
public abstract class CloneBase : MonoBehaviour {
public GameObject clonePrefab;//绑定的预制体
public CloneObjType cloneObjType;//克隆类型
public virtual void OnEnable()
{
MessageDispatcher.AddListener("CLONE_COMMAND", Execute);
}
public virtual void OnDisable()
{
MessageDispatcher.RemoveListener("CLONE_COMMAND", Execute);
}
public virtual void OnDestroy()
{
MessageDispatcher.RemoveListener("CLONE_COMMAND", Execute);
}
public abstract void Execute(IMessage obj);
}