Exemple #1
0
        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;
 }
Exemple #3
0
 public void SetConfig(AbilityConfig configToSet)
 {
     config = configToSet;
 }
Exemple #4
0
 public void SetConfig(AbilityConfig configToSet)
 {
     config   = configToSet;
     animClip = config.GetAbilityAnimation();
 }
Exemple #5
0
 public void SetConfiguration(AbilityConfig configToSet)
 {
     config = configToSet;
 }
Exemple #6
0
 private void SetupAbilityAnimation(AbilityConfig ability)
 {
     animator.runtimeAnimatorController          = animatorOverrideController;
     animatorOverrideController[DEFAULT_ABILITY] = ability.GetAbilityAnimation(); //remove const
 }