Exemple #1
0
    public void Began()
    {
        if (GameController.currentState == gameState.PLAY)
        {
            switch (nomeBotao)
            {
            case "cor":
                _background.ChangeColor();
                break;

            case "pulo":
                _player.Jump();
                break;

            case "fase":
                SceneManager.LoadScene(nomeFases);
                break;

            case "texto":
                _texto.ExecutaSoletrar();
                GameController.currentState = gameState.TEXTO;
                break;
            }
        }
        else if (GameController.currentState == gameState.TEXTO)
        {
            if (nomeBotao == "texto")
            {
                _texto.campoTexto.text      = "";
                GameController.currentState = gameState.PLAY;
            }
        }
    }