private void Awake()
 {
     menuManager = GetComponentInParent <MenuManager>();
     optionMover = GetComponentInChildren <OptionMover>();
 }
示例#2
0
 void Awake()
 {
     if(_instance == null)
     {
         _instance = this;
         DontDestroyOnLoad(this.gameObject);
         _currentState = MenuState.Title;
         _previousState = MenuState.Title;
         _menuElements = GameObject.FindObjectsOfType<MenuElement>();
     }
     else if(_instance != this) Destroy(this.gameObject);
 }
示例#3
0
 public void Back()
 {
     SaveManager.SaveAudio(_sfx.value, _music.value);
     this.Deactivate();
     MenuManager.StateTransition(MenuManager.MenuState.NoStateOverride, MenuManager.MenuState.Settings);
 }