예제 #1
0
 public BuffManager(IBuffTarget target)
 {
     mBuffTarget = target;
     mBuffMap    = new Dictionary <int, Buff>();
     mState      = BuffType.NONE;
     bLocked     = false;
 }
예제 #2
0
 public BuffFreeze(int buffType, IBuffTarget target, float duration) : base(buffType, target, duration)
 {
 }
예제 #3
0
 public TimeBuff(int buffType, IBuffTarget target, float duration) : base(buffType, target)
 {
     TimeElappsed = 0;
     Duration     = duration;
 }
예제 #4
0
    // TODO: Is it worth to use reflection on this one?
    private void Initialize()
    {
        switch (data.attackTarget)
        {
        case AttackTarget.Closest:
            iAttackTarget = new ClosestAttackTarget(this);
            break;

        default:
            iAttackTarget = new NoneAttackTarget();
            break;
        }

        switch (data.onHitEffect)
        {
        case OnHitEffect.Slow:
            iOnHitEffect = new SlowAbility();
            break;

        case OnHitEffect.Stun:
            iOnHitEffect = new StunAbility();
            break;

        default:
            iOnHitEffect = new NoneAbility();
            break;
        }

        switch (data.attackType)
        {
        case AttackType.SingleTarget:
            iAttack = new SingleTargetAttack(this, iOnHitEffect);
            break;

        case AttackType.AOE:
            iAttack = new AOEAttack(this, iOnHitEffect);
            break;
        }

        switch (data.buffTarget)
        {
        case BuffTarget.Aura:
            iBuffTarget = new AuraBuffTarget(this);
            break;

        default:
            iBuffTarget = new NoneBuffTarget();
            break;
        }

        switch (data.buffType)
        {
        case BuffType.AttackDamage:
            iBuff = new AttackDamageBuff(this);
            break;

        case BuffType.AttackSpeed:
            iBuff = new AttackSpeedBuff(this);
            break;
        }
    }
예제 #5
0
 public BuffAccelerate(int buffType, IBuffTarget target, float duration, float accelerate) : base(buffType, target, duration)
 {
     Accelerate = accelerate;
 }