Beispiel #1
0
        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");
            }
        }
Beispiel #2
0
 public void eventTrigger(PassObject obj)
 {
     progressText.text      = $"{Mathf.RoundToInt(obj.GetObject<float>())}%";
     progressBar.fillAmount = obj.GetObject <float>();
 }
Beispiel #3
0
 public void eventTrigger(PassObject obj)
 {
     input.text = obj.GetObject <String>();
 }
Beispiel #4
0
 public void eventTrigger(PassObject obj)
 {
     text.color = obj.GetObject <Color>();
 }