public bool InEndScreen() { if (currentState.Equals(MenuStates.EndScreen)) { return(true); } return(false); }
public void ChangeState(MenuStates newState) { prevState = currentState; currentState = newState; // print(prevState); // print(currentState); SceneManager.Instance.prevState = prevState; SceneManager.Instance.currentState = currentState; if (!prevState.Equals(MenuStates.Shop)) { AllPanels[(int)prevState].SetActive(false); } else if (!SceneManager.Instance.IsSceneLoaded(1)) // Load Scene if shop { SceneManager.Instance.LoadScene(1); } if (!currentState.Equals(MenuStates.Shop)) { AllPanels[(int)currentState].SetActive(true); } else if (!SceneManager.Instance.IsSceneLoaded(2)) // Load Scene if shop { SceneManager.Instance.LoadScene(2); } if (prevState == MenuStates.Settings && !(GameManager.Instance.State1 == GameManager.State.RepositionState)) { if (GameManager.Instance.gameObject) { GameManager.Instance.gameObject.GetComponent <BowlReposition>().ResetFuntion(); } } AllRefs.I.headerHandler.SelectButton(); // Debug.Log("MM"); }