From 3b036c6de871aa519a1f7fbfb52e09618945041f Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Mon, 15 May 2023 09:28:11 +0800 Subject: *misc --- WorldlineKeepers/Assets/Scripts/Tests/TestEvent.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'WorldlineKeepers/Assets/Scripts/Tests/TestEvent.cs') diff --git a/WorldlineKeepers/Assets/Scripts/Tests/TestEvent.cs b/WorldlineKeepers/Assets/Scripts/Tests/TestEvent.cs index c6e9bba..54df05b 100644 --- a/WorldlineKeepers/Assets/Scripts/Tests/TestEvent.cs +++ b/WorldlineKeepers/Assets/Scripts/Tests/TestEvent.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using UnityEngine; using WK; -public class TestEvent : MonoBehaviour +public class TestEvent : MonoBehaviour, INotification { #region εΊεˆ—εŒ– @@ -28,13 +28,15 @@ public class TestEvent : MonoBehaviour private void OnEnable() { - GlobalEventManager.Instance.Register("Health.BurnKill", OnEventCheck); - GlobalEventManager.Instance.Notify("Health.BurnKill"); + //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) { - Debug.Log("msg"); + Debug.Log("msg" + p[0]); } } -- cgit v1.1-26-g67d0