public void AddBuff(Buff.Type buff, float amount, float time) { Buff buffVar = null; switch (buff) { case Buff.Type.Speed: buffVar = speedBuff; break; case Buff.Type.Damage: buffVar = damageBuff; break; case Buff.Type.Shoot: buffVar = shootBuff; break; } buffVar.amount = amount; buffVar.timeRemaining = time; }
public int GetBuffCount(Buff.Type type) { return(buffs[(int)type - 1].Count); }