Exemplo n.º 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);
        }
    }
Exemplo n.º 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);
        }
    }
Exemplo n.º 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);
        }
    }