Esempio n. 1
0
                private IEnumerator start()
                {
                    SceneSystem.PushScene("StartMenu");

                    //等待上升动画
                    yield return(new WaitForSeconds(2));

                    GameMessageManager.ResetGameMessage();
                    while (true)
                    {
                        if (GameMessageManager.GetGameMessage(GameMessage.Start))
                        {
                            break;
                        }
                        if (GameMessageManager.GetGameMessage(GameMessage.Exit))
                        {
                            Application.Quit();
                        }
                        yield return(0);
                    }

                    SceneSystem.ChangeScene("GameTip");
                    StartCoroutine(exitCheck());

                    //等待上升动画
                    yield return(new WaitForSeconds(2));

                    GameMessageManager.ResetGameMessage();
                    while (true)
                    {
                        if (GameMessageManager.GetGameMessage(GameMessage.Start))
                        {
                            break;
                        }
                        yield return(0);
                    }

                    ScoreManager.Init();

                    while (Setter.setting.currentScene < Setter.setting.sceneCount)
                    {
                        yield return(beforeStart());

                        yield return(playScene("scene" + (Setter.setting.currentScene / 10) + (Setter.setting.currentScene % 10)));

                        yield return(gameWin());

                        Setter.setting.currentScene++;
                    }
                }
Esempio n. 2
0
                private IEnumerator gameWin()
                {
                    SceneSystem.ChangeScene("GameWin");

                    //等待上升动画
                    yield return(new WaitForSeconds(2));

                    GameMessageManager.ResetGameMessage();
                    while (true)
                    {
                        yield return(0);

                        if (GameMessageManager.GetGameMessage(GameMessage.Start))
                        {
                            break;
                        }
                    }
                    yield return(0);
                }
Esempio n. 3
0
                private IEnumerator playScene(string sceneName)
                {
                    SceneSystem.ChangeScene(sceneName);

                    GameMessageManager.ResetGameMessage();
                    //胜利判定
                    while (true)
                    {
                        yield return(0);

                        if (GameMessageManager.GetGameMessage(GameMessage.Win))
                        {
                            break;
                        }
                        if (GameMessageManager.GetGameMessage(GameMessage.Lose))
                        {
                            yield return(gameOver());

                            break;
                        }
                    }
                }