void SelectAbilityButton(PlayerAbility ability, AbilityButton button) { button.SetSelected(); selectedAbility = ability; buttons.ForEach(b => { if (b != button) { b.button.interactable = false; } }); ConfirmMove(); }
void SelectAbilityButton(PlayerAbility ability, AbilityButton button) { currentlyActivatingAbility = true; button.SetSelected(); selectedAbility = ability; buttons.ForEach(b => { if (b != button) { b.button.interactable = false; } }); called(selectedAbility); }
private void UpdateBallType(bool turnOn, AbilityButton abilityButton) { if (turnOn) { activeButton?.SetSelected(false); activeButton = abilityButton; OnBallTypeChanged?.Invoke(abilityButton.BallType); return; } if (!turnOn && abilityButton == activeButton) { activeButton.SetSelected(false); activeButton = null; OnBallTypeChanged?.Invoke(BallType.Normal); } }