Exemplo n.º 1
0
    private void ButtonTriggered()
    {
        SetCooldown();

        AudioHelper.PlayClip2D(_ability._abilityClip, 1f);
        _ability.TriggerAbility();
        AbilityActivated?.Invoke();
    }
Exemplo n.º 2
0
    private void OnActivateAbility(Ability ability)
    {
        var abilityActivated = new AbilityActivated()
        {
            cardDisplay = this.CardDisplay,
            ability     = ability
        };

        Unibus.Dispatch(ABILITY_ACTIVATED, abilityActivated);
    }
Exemplo n.º 3
0
    private void OnAbilityActivated(AbilityActivated abilityActivated)
    {
        if (abilityActivated.ability is HealingAbility)
        {
            this.EnableSelectingHealingTargetState(abilityActivated.ability as HealingAbility);
        }

        if (abilityActivated.ability is ManaAbility)
        {
            this.UseManaAbility();
        }

        if (abilityActivated.ability is AimingAbility)
        {
            this.ToAim();
        }
    }