コード例 #1
0
    public IEnumerator StartTheGame(GameController gameController)
    {
        displayText.SetRestartText("");
        displayText.SetGameOverText("");
        displayText.SetChallengeAlertText("");

        yield return(new WaitForSeconds(1f));

        displayText.SetGameOverText(phase.phaseNameTxt);
        yield return(new WaitForSeconds(2f));

        displayText.SetGameOverText(phase.phaseChallengeTxt);
        yield return(new WaitForSeconds(2f));

        yield return(new WaitForSeconds(2f));

        displayText.SetChallengeAlertTextColor(0f, 1f, 0f, 1f);
        displayText.SetChallengeAlertText(InGameConstantStrings.READY);

        yield return(new WaitForSeconds(1f));

        displayText.SetChallengeAlertText(InGameConstantStrings.GO);
        displayText.SetGameOverText("");

        yield return(new WaitForSeconds(1f));

        gameController.UpdateChallenge();
        player.PlayerAwake();
    }
コード例 #2
0
    public void RestartGame()
    {
        if (gameController.RestartFlag)
        {
            displayText.SetRestartText(InGameConstantStrings.RESTART);

            if (Input.GetKeyDown(KeyCode.R))
            {
                SceneController scene = new SceneController();
                challenge.ResetDifficult();
                scene.ResetScene();
            }
        }
    }