public static void TriggerEvent <T>(T i_eventName, PassObject i_passObject = null) { Type t = i_eventName.GetType(); if (t.IsEnum) { //Debug.Log($"<color=green>Triggered: {i_eventName}</color>"); Action <PassObject> thisEvent = null; if (eventDictionary.TryGetValue(i_eventName.ToString(), out thisEvent) && thisEvent != null) { thisEvent(i_passObject); } } else { Debug.LogError($"{i_eventName.ToString()} is not an enum Type"); } }
public void eventTrigger(PassObject obj) { progressText.text = $"{Mathf.RoundToInt(obj.GetObject<float>())}%"; progressBar.fillAmount = obj.GetObject <float>(); }
public void eventTrigger(PassObject obj) { input.text = obj.GetObject <String>(); }
public void eventTrigger(PassObject obj) { text.color = obj.GetObject <Color>(); }