From f2dce4c58e735d99f488bfbca048e94343dd93a9 Mon Sep 17 00:00:00 2001
From: Erno Lokkila <eolokk@utu.fi>
Date: Sun, 3 Mar 2019 10:38:20 +0200
Subject: [PATCH] updated event system

---
 Assets/Scripts/EventSystem/EventSystem.cs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Assets/Scripts/EventSystem/EventSystem.cs b/Assets/Scripts/EventSystem/EventSystem.cs
index 0762879..8726731 100644
--- a/Assets/Scripts/EventSystem/EventSystem.cs
+++ b/Assets/Scripts/EventSystem/EventSystem.cs
@@ -15,9 +15,12 @@ public static class EventSystem
 
     public static void EventHappened(EventType name)
     {
+        Debug.Log("happened");
         if (events.ContainsKey(name))
         {
-            foreach (IAction e in events.Values){
+
+            Debug.Log("contains: "+events.Values.ToString());
+            foreach (IAction e in events[name]){
                 e.React(name);
             }
         }
-- 
GitLab