public override void OnDisable() { base.OnDisable(); LockPauseModule.UnlockControls(this); LockPauseModule.UnpauseGame(this); }
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; } } }
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; } } }
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 }
private void DoUnpause() { LockPauseModule.UnlockControls(this); LockPauseModule.UnpauseGame(this); }
public override void OnDisable() { LockPauseModule.UnpauseGame(this); }