コード例 #1
0
ファイル: AbilityManager.cs プロジェクト: pavelbraginskiy/DJD
    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);
        }
    }
コード例 #2
0
 public virtual void executeAbilityWith(EAbilities A, int version = 0, int minRP = 0)
 {
     DEB_testManager.testInstant(version, minRP, abiCon.getAbility(A), this, null);
 }
コード例 #3
0
 public AbstractAbility getAbility(EAbilities A)
 {
     return abilities[A];
 }