diff options
author | chai <chaifix@163.com> | 2022-04-25 17:12:37 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-04-25 17:12:37 +0800 |
commit | 78bc7a1db913a038424cb5fac6e75ccccc195cfb (patch) | |
tree | 9b5c3c483985f53736bc2de21bb8fbc3649b161e /SurvivalTest/Assets/Scripts | |
parent | cce2815f3bcfeec2f4c13386d073d20778724656 (diff) |
*misc
Diffstat (limited to 'SurvivalTest/Assets/Scripts')
4 files changed, 12 insertions, 3 deletions
diff --git a/SurvivalTest/Assets/Scripts/Items/ExecutorParts/Item_ExecutorPart.cs b/SurvivalTest/Assets/Scripts/Items/ExecutorParts/Item_ExecutorPart.cs index 43af6f9..3cf8a88 100644 --- a/SurvivalTest/Assets/Scripts/Items/ExecutorParts/Item_ExecutorPart.cs +++ b/SurvivalTest/Assets/Scripts/Items/ExecutorParts/Item_ExecutorPart.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using UnityEngine; /// <summary> -/// 执行者的部件,集齐之后召唤执行者机器人 +/// 执行者的部件,6个部件集齐之后召唤执行者机器人 /// 执行者机器人的攻击通过眼发射高能射线,高速扫射敌人 /// 执行者笔挺的飘在空中,类似管家的姿势,一只手背在身后,眼里发射射线 /// </summary> diff --git a/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Weapons.cs b/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Weapons.cs index 16f9396..d6d522a 100644 --- a/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Weapons.cs +++ b/SurvivalTest/Assets/Scripts/Managers/PlayerManager_Weapons.cs @@ -22,7 +22,7 @@ public partial class PlayerManager : Singleton<PlayerManager> set { m_AutoFire = value; - EventCenter.Instance.Publish(EventMsgType.ToggleAutoFire, null); + EventCenter.Instance.Publish(EventMsgType.ToggleAutoFire); } } private float autoFireDuration = 0.8f; diff --git a/SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs b/SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs index b05fdab..c8a1f26 100644 --- a/SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs +++ b/SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs @@ -86,7 +86,7 @@ public class TestPeaceMaker : CrewScript set { PlayerManager.Instance.lockAim = value; - EventCenter.Instance.Publish(EventMsgType.ToggleLockAim, null); + EventCenter.Instance.Publish(EventMsgType.ToggleLockAim); } } diff --git a/SurvivalTest/Assets/Scripts/Utils/EventCenter.cs b/SurvivalTest/Assets/Scripts/Utils/EventCenter.cs index eef3646..39b7909 100644 --- a/SurvivalTest/Assets/Scripts/Utils/EventCenter.cs +++ b/SurvivalTest/Assets/Scripts/Utils/EventCenter.cs @@ -45,4 +45,13 @@ public class EventCenter : Singleton<EventCenter> } } + public void Publish(EventMsgType evt) + { + List<EventHandler> handlers; + if (m_EventHandlers.TryGetValue(evt, out handlers)) + { + handlers.ForEach(h => h(null)); + } + } + }
\ No newline at end of file |