private void Initialize()
    {
        if (!isInitialized)
        {
            isInitialized = true;
            cutScenes.ForEach(cutScene => cutScene.AddEventListener(this.gameObject));

            if (this.transform.Find("CutSceneEnableCollider"))
            {
                cutSceneEnableTriggerListener = this.transform.Find("CutSceneEnableCollider").GetComponent <TriggerListener>();
                cutSceneEnableTriggerListener.AddEventListener(this.gameObject);
            }

            uiElements = new List <UIElement>(SceneUtils.FindObjectsOfType <UIElement>());
        }
    }
Example #2
0
    private void Initialize()
    {
        if (!isInitialized)
        {
            isInitialized = true;
            cutScenes.ForEach(cutScene => cutScene.AddEventListener(this.gameObject));

            cutsceneEnableColliders = GetComponentsInChildren <CutsceneEnableCollider>();

            if (cutsceneEnableColliders != null)
            {
                for (int i = 0; i < cutsceneEnableColliders.Length; i++)
                {
                    cutsceneEnableColliders[i].AddEventListener(this.gameObject);
                }
            }

            uiElements = new List <UIElement>(SceneUtils.FindObjectsOfType <UIElement>());
        }
    }