summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SurvivalTest/Assets/Scripts/Items/ExecutorParts/Item_ExecutorPart.cs2
-rw-r--r--SurvivalTest/Assets/Scripts/Managers/PlayerManager_Weapons.cs2
-rw-r--r--SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs2
-rw-r--r--SurvivalTest/Assets/Scripts/Utils/EventCenter.cs9
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