Example #1
0
 public void OnMessage(string msg)
 {
     if (OnMessageEvent != null)
     {
         CutsceneEventArgs args = new CutsceneEventArgs();
         args.msg = msg;
         OnMessageEvent(this, args);
     }
 }
Example #2
0
 /// <summary>
 /// On cutscene finish, play the next cutscene.
 /// </summary>
 void CutsceneQueue_CutsceneFinished(object sender, CutsceneEventArgs e)
 {
     Cutscenes[index].CutsceneFinished -= CutsceneQueue_CutsceneFinished;
     if (Cutscenes != null && index + 1 < Cutscenes.Count)
     {
         index++;
         Cutscenes[index].CutsceneFinished += CutsceneQueue_CutsceneFinished;
         Cutscenes[index].Play();
     }
 }
 /// <summary>
 /// On cutscene finish, play the next cutscene.
 /// </summary>
 void CutsceneQueue_CutsceneFinished(object sender, CutsceneEventArgs e)
 {
     Cutscenes[index].CutsceneFinished -= CutsceneQueue_CutsceneFinished;
     if (Cutscenes != null && index + 1 < Cutscenes.Count)
     {
         index++;
         Cutscenes[index].Play();
         Cutscenes[index].CutsceneFinished += CutsceneQueue_CutsceneFinished;
     }
 }
        /// <summary>
        /// On cutscene finish, play the next cutscene.
        /// </summary>
        void CutsceneQueue_CutsceneFinished(object sender, CutsceneEventArgs e)
        {
            Debug.Log(e.targetScene);
            e.targetScene.CutsceneFinished -= CutsceneQueue_CutsceneFinished;
            for (int k = 0; k < ColliderActions.Count; k++)
            {
                ColliderActions [k].collider.SetActive(true);
            }

            if (loop)
            {
                index++;
                if (index == ColliderActions.Count)
                {
                    index = 0;
                }

                ColliderActions [index].cutscene.CutsceneFinished += CutsceneQueue_CutsceneFinished;
                ColliderActions [index].cutscene.Play();
            }
        }