Exemplo n.º 1
0
    void HandleBack()
    {
        if (Input.GetButtonDown("Back_P" + playerNumber))
        {
            switch (_state)
            {
            case State.READY:
                _state = State.SELECTING;
                newPlayerController.RemoveSelection();
                gameObject.GetComponent <Blink>().StopBlink();
                break;

            case State.SELECTING:
                _state = State.ADD;
                CharacterCollection.DeselectCharacter(playerNumber);
                newPlayerController.RemoveCharacter();
                auxText.text = "";
                gameObject.GetComponent <Blink>().StartBlink();
                break;
            }
            PlaySound(backSound);
        }
    }