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; }
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(); } }