コード例 #1
0
        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;
                }
            });
        }
コード例 #2
0
        void OnMouseDown()
        {
            if (cutscene == null)
            {
                Debug.LogError("Cutscene is not provided", gameObject);
                return;
            }

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

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

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

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