Exemple #1
0
        public override void OnDisable()
        {
            base.OnDisable();

            LockPauseModule.UnlockControls(this);
            LockPauseModule.UnpauseGame(this);
        }
Exemple #2
0
 private void CloseDialogue()
 {
     CurrentDialogue = null;
     LockPauseModule.UnpauseGame(this.gameObject);
     AudioPlayer.Instance.ClearMusic(MusicSlot.Cinematic);
     if (CameraController)
     {
         Destroy(CameraController.gameObject);
     }
     Destroy(this.gameObject);
     if (CurrentCallback != null)
     {
         try
         {
             CurrentCallback();
         }
         catch (Exception e)
         {
             Debug.LogException(e);
         }
         finally
         {
             CurrentCallback = null;
         }
     }
 }
Exemple #3
0
 private void OnDestroy()
 {
     if (CCBase.Terminated)
     {
         return; //nop, game is ended anyway and there's nothing we can meaningfully do
     }
     ScriptingModule.CallNamedHooked("DialogueOnClose", this);
     CurrentDialogue = null;
     LockPauseModule.UnpauseGame(this.gameObject);
     AudioPlayer.Instance.ClearMusic(MusicSlot.Cinematic);
     if (CameraController)
     {
         Destroy(CameraController.gameObject);
     }
     UnhideAllObjects();
     CurrentTarget = null;
     UnsetPlayerFlags();
     if (CurrentCallback != null)
     {
         try
         {
             CurrentCallback();
         }
         catch (Exception e)
         {
             Debug.LogException(e);
         }
         finally
         {
             CurrentCallback = null;
         }
     }
 }
Exemple #4
0
        static void PurgeDialogueSystems()
        {
            DialogueController.CurrentDialogue = null;
            DialogueController.CurrentCallback = null;

            var ds = GameObject.Find("DialogueSystem");

            if (ds != null)
            {
                LockPauseModule.UnpauseGame(ds);
                GameObject.Destroy(ds);
            }

            var dc = GameObject.Find("DialogueCamera");

            if (dc != null)
            {
                GameObject.Destroy(dc);
            }

            AudioPlayer.Instance.ClearMusic(MusicSlot.Cinematic);
            LockPauseModule.ForceCleanLocks(); //useless since objects aren't *yet* destroyed
        }
Exemple #5
0
 private void DoUnpause()
 {
     LockPauseModule.UnlockControls(this);
     LockPauseModule.UnpauseGame(this);
 }
Exemple #6
0
 public override void OnDisable()
 {
     LockPauseModule.UnpauseGame(this);
 }