using System.Collections; using System.Collections.Generic; using UnityEngine; using WK; public class TestEvent : MonoBehaviour, INotification { #region 序列化 #endregion #region 公共字段 #endregion #region 私有字段 #endregion private void Awake() { // 私有字段赋值 // 公共字段赋值 // 初始化 } private void OnEnable() { //GlobalEventManager.Instance.Register("Health.BurnKill", OnEventCheck); //GlobalEventManager.Instance.Notify("Health.BurnKill"); this.AddObserver("Health", OnEventCheck); this.PostNotification("Health", "asdasd"); } private void OnEventCheck(params object[] p) { LogHelper.Log("msg" + p[0]); } }