예제 #1
0
    private void ActivatePerk()
    {
        PerkProperties.GetActivePerks(turnHandler.activePlayer);
        currentlySelected.GetComponent <Perk>().SetActivated(true);
        PerkProperties.SetActivePerk(turnHandler.activePlayer, currentlySelected.GetComponent <Perk>());
        panelAnimator.Play("ClosePerksGain");
        currentlySelected = selection[0];

        controlsHandler.SetMenuOpen(false);
        controlsHandler.ignoreOtherMenus = false;
    }
예제 #2
0
    private void ConfirmControlsListiner(float direction)
    {
        //Navigate between the Yes and No buttons
        if (direction != 0)
        {
            ConfirmNavigation();
        }

        //Handle the Submit event
        else if (Input.GetKeyDown(KeyCode.KeypadEnter))
        {
            //If the Yes button was submitted, activate the selected Perk
            if (activeButton == yesButton)
            {
                ActivePerk.GetComponent <Perk>().SetActivated(true);
                PerkProperties.SetActivePerk(currentPlayer, ActivePerk.GetComponent <Perk>());
                SetOriginalColor(ActivePerk);
            }

            CloseDialogue();
        }
    }