コード例 #1
0
 void SelectAbilityButton(PlayerAbility ability, AbilityButton button)
 {
     button.SetSelected();
     selectedAbility = ability;
     buttons.ForEach(b => {
         if (b != button)
         {
             b.button.interactable = false;
         }
     });
     ConfirmMove();
 }
コード例 #2
0
    void SelectAbilityButton(PlayerAbility ability, AbilityButton button)
    {
        currentlyActivatingAbility = true;

        button.SetSelected();
        selectedAbility = ability;
        buttons.ForEach(b => {
            if (b != button)
            {
                b.button.interactable = false;
            }
        });
        called(selectedAbility);
    }
コード例 #3
0
    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);
        }
    }