public void Invoke(EAbilities ability, Vector2 _direction, Vector2 _pos, int _targetLayer) { AbilityBase newAbility = null; if (cooldown.IsStopped()) { switch (ability) { case EAbilities.FIREBALL: newAbility = new Fireball(_direction, _pos, _targetLayer); break; case EAbilities.PYROBLAST: newAbility = new Pyroblast(_direction, _pos, _targetLayer); break; case EAbilities.CHAIN_LIGHTNING: newAbility = new ChainLightning(_direction, _pos, _targetLayer); break; default: newAbility = new Fireball(_direction, _pos, _targetLayer); break; } cooldown.WaitTime = newAbility.cooldown; cooldown.Start(); AddChild(newAbility); } }
public virtual void executeAbilityWith(EAbilities A, int version = 0, int minRP = 0) { DEB_testManager.testInstant(version, minRP, abiCon.getAbility(A), this, null); }
public AbstractAbility getAbility(EAbilities A) { return abilities[A]; }