void OnTriggerEnter(Collider other)
        {
            if (cutscene == null)
            {
                Debug.LogError("Cutscene is not provided", gameObject);
                return;
            }

            if (checkSpecificTagOnly && !string.IsNullOrEmpty(tagName))
            {
                if (other.gameObject.tag != tagName)
                {
                    return;
                }
            }

            enabled = false;
            cutscene.Play(() =>
            {
                onFinish.Invoke();
                if (once)
                {
                    Destroy(this.gameObject);
                }
                else
                {
                    enabled = true;
                }
            });
        }
Exemple #2
0
        void OnMouseDown()
        {
            if (cutscene == null)
            {
                Debug.LogError("Cutscene is not provided", gameObject);
                return;
            }

            cutscene.Play(() => { onFinish.Invoke(); });
        }
Exemple #3
0
        void Start()
        {
            if (cutscene == null)
            {
                Debug.LogError("Cutscene is not provided", gameObject);
                return;
            }

            cutscene.Play(startTime, () => { onFinish.Invoke(); });
        }
Exemple #4
0
        IEnumerator Start()
        {
            yield return(null);

            if (cutscene == null)
            {
                Debug.LogError("Cutscene is not provided", gameObject);
                yield break;
            }

            cutscene.Play(() => { onFinish.Invoke(); });
        }