天津23维预案
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
593 B

3 years ago
using UnityEngine;
using System.Collections;
using AX.MessageSystem;
/// <summary>
/// 基础类,注册并响应LOAD事件,被加载物体的脚本继承
/// </summary>
public abstract class Load : MonoBehaviour {
protected virtual void OnDestroy()
{
MessageDispatcher.RemoveListener("LOAD", LOAD);
}
protected virtual void OnEnable()
{
MessageDispatcher.AddListener("LOAD", LOAD);
}
protected virtual void OnDisable()
{
MessageDispatcher.RemoveListener("LOAD", LOAD);
}
public abstract void LOAD(IMessage message);
}