private IEnumerator _InGame() { yield return(new WaitForSeconds(SceneSystem.PopAndPushScene(_inGame))); ResetGameMessage(); while (true) { yield return(0); if (GetGameMessage(GameMessage.Return)) { StartCoroutine(_StartMenu()); yield break; } if (GetGameMessage(GameMessage.Exit)) { Application.Quit(); yield break; } } }
private IEnumerator _Lobby() { yield return(new WaitForSeconds(SceneSystem.PopAndPushScene(_lobby))); ResetGameMessage(); while (true) { yield return(0); if (GetGameMessage(GameMessage.Start)) { StartCoroutine(_InGame()); yield break; } if (GetGameMessage(GameMessage.Return)) { StartCoroutine(_StartMenu()); yield break; } } }