summaryrefslogtreecommitdiff
path: root/SurvivalTest/Assets/Scripts/Utils
diff options
context:
space:
mode:
Diffstat (limited to 'SurvivalTest/Assets/Scripts/Utils')
-rw-r--r--SurvivalTest/Assets/Scripts/Utils/EventCenter.cs9
1 files changed, 9 insertions, 0 deletions
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