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