public void StopListening(GameplayEvent.Type eventName, Action <string> listener)
        {
            if (eventDictionary == null)
            {
                Init();
            }

            Action <string> thisEvent = null;

            if (eventDictionary.ContainsKey(eventName))
            {
                thisEvent  = eventDictionary[eventName];
                thisEvent -= listener;
            }
        }
        public void TriggerEvent(GameplayEvent.Type eventName, string message = "")
        {
            if (eventDictionary == null)
            {
                Init();
            }

            Action <string> thisEvent = null;

            if (eventDictionary.ContainsKey(eventName))
            {
                thisEvent = eventDictionary[eventName];
                thisEvent(message);
            }
        }
Exemple #3
0
 public void StartListening(GameplayEvent.Type type, Action <string> listen)
 {
     _GameplayObserver.StartListening(type, listen);
 }
Exemple #4
0
 public void TriggerGameplayEvent(GameplayEvent.Type type, string message = "")
 {
     _GameplayObserver.TriggerEvent(type, message);
 }
 /// <summary>
 /// Trigger Gameplay event
 /// </summary>
 /// <param name="e"></param>
 /// <param name="message"></param>
 public void TriggerGameplayEvent(GameplayEvent.Type e, string message = "")
 {
     GAMEManager.Instance.TriggerGameplayEvent(e, message);
 }