public BuffManager(IBuffTarget target) { mBuffTarget = target; mBuffMap = new Dictionary <int, Buff>(); mState = BuffType.NONE; bLocked = false; }
public BuffFreeze(int buffType, IBuffTarget target, float duration) : base(buffType, target, duration) { }
public TimeBuff(int buffType, IBuffTarget target, float duration) : base(buffType, target) { TimeElappsed = 0; Duration = duration; }
// 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; } }
public BuffAccelerate(int buffType, IBuffTarget target, float duration, float accelerate) : base(buffType, target, duration) { Accelerate = accelerate; }