public void PlayGame() { m_currentGameState.SetActive(false); m_currentGameState = m_GameStates[(int)m_states.PLAY]; m_currentGameState.SetActive(true); m_currentState = m_states.PLAY; }
public void GameOver() { m_currentGameState.SetActive(false); m_currentGameState = m_GameStates[(int)m_states.GAMEOVER]; m_currentGameState.SetActive(true); m_currentState = m_states.GAMEOVER; }
// Use this for initialization void Start() { int numStates = m_GameStates.Length; foreach (GameObject go in m_GameStates) { go.SetActive(false); } m_currentState = m_states.MENU; m_currentGameState = m_GameStates[(int)m_states.MENU]; m_currentGameState.SetActive(true); }