using AX.InputSystem;
using AX.MessageSystem;
using System.Collections.Generic;
using UnityEngine;
///
/// 克隆物体对象操作基类
///
public abstract class CloneBase : MonoBehaviour
{
public GameObject clonePrefab;//绑定的预制体
public CloneObjType cloneObjType;//克隆类型
protected int number = 0;//计数
public string ResourcesName;
[HideInInspector]
public GameObject cloneObj;//克隆出的物体
public virtual void Awake()
{
if (clonePrefab==null)
{
clonePrefab = Resources.Load(ResourcesName) as GameObject;
}
}
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);
public abstract void AddRecordFrame(List list);
public abstract void AddRecordEventClone(Transform obj);
public abstract void AddRecordTag(List list);
}