Beispiel #1
0
    public static void TriggerEvent(string eventName, Camera param)
    {
        UnityEventCamera thisEvent = null;

        if (Instance != null && Instance.eventDictionaryCamera.TryGetValue(eventName, out thisEvent))
        {
            thisEvent.Invoke(param);
        }
    }
Beispiel #2
0
    public static void StopListeningClass(string eventName, UnityAction <Camera> listener)
    {
        if (Instance == null)
        {
            return;
        }
        UnityEventCamera thisEvent = null;

        if (Instance.eventDictionaryCamera.TryGetValue(eventName, out thisEvent))
        {
            thisEvent.RemoveListener(listener);
        }
    }
Beispiel #3
0
    public static void StartListeningClass(string eventName, UnityAction <Camera> listener)
    {
        UnityEventCamera thisEvent = null;

        if (Instance.eventDictionaryCamera.TryGetValue(eventName, out thisEvent))
        {
            thisEvent.AddListener(listener);
        }
        else
        {
            thisEvent = new UnityEventCamera();
            thisEvent.AddListener(listener);
            Instance.eventDictionaryCamera.Add(eventName, thisEvent);
        }
    }