public void EnableDictionaryWindowController() { if (dictionaryWindowController == null) { dictionaryWindowController = GameObject.FindGameObjectWithTag("Player").GetComponent <DictionaryWindowController>(); } dictionaryWindowController.Enable(); }
/// <summary> /// Called when the Dictionary Menu becomes the focus of the game. /// </summary> public void FocusDictionary() { if (playerMenuController == null) { playerMenuController = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerMenuController>(); } if (dictionaryController == null) { dictionaryController = GameObject.FindGameObjectWithTag("Player").GetComponent <DictionaryWindowController>(); } playerMenuController.Disable(); dictionaryController.Enable(); currentWindowController = dictionaryController; foreach (IDictionaryWindowOpenedListener listener in dictionaryOpenedListeners) { listener.OnDictionaryWindowOpened(); } if (dictionaryOpenSFX != null) { dictionaryOpenSFX.Play(); } }