private void AttempSpecialAbility(int abilityIndex) { var energyComponent = GetComponent <Energy>(); AbilityConfig specialAbility = abilities[abilityIndex]; if (energyComponent.IsEnergyAvailable(specialAbility.GetEnergyCost())) { energyComponent.ConsumeEnergy(specialAbility.GetEnergyCost()); var abilityParams = new AbilityUseParams(this.currentEnemy, baseDamage); specialAbility.Use(abilityParams); } else { print("Not enough mana"); } }
public void SetConfig(AbilityConfig config) { this.config = (T)config; }
public void SetConfig(AbilityConfig configToSet) { config = configToSet; }
public void SetConfig(AbilityConfig configToSet) { config = configToSet; animClip = config.GetAbilityAnimation(); }
public void SetConfiguration(AbilityConfig configToSet) { config = configToSet; }
private void SetupAbilityAnimation(AbilityConfig ability) { animator.runtimeAnimatorController = animatorOverrideController; animatorOverrideController[DEFAULT_ABILITY] = ability.GetAbilityAnimation(); //remove const }