예제 #1
0
    public void GetChoice()
    {
        string choiceName = UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject.name;

        print("Player selected: " + choiceName);

        GameChoices selectedChoice = GameChoices.NONE;

        switch (choiceName)
        {
        case "Rock":
            selectedChoice = GameChoices.ROCK;
            break;

        case "Paper":
            selectedChoice = GameChoices.PAPER;
            break;

        case "Scissors":
            selectedChoice = GameChoices.SCISSORS;
            break;
        }

        gameplayController.SetChoices(selectedChoice);
        animationController.PlayerMadeChoice();
    }