public void AddDebuff(Debuff newDebuff) { if (debuffs.Contains(newDebuff)) { startTimes[newDebuff] = Time.time; procTimes[newDebuff] = 0f; } else { debuffs.Add(newDebuff); startTimes[newDebuff] = Time.time; procTimes[newDebuff] = 0f; } }
void Expire(Debuff expiredDebuff) { expiredDebuff.Revert(this); debuffs.Remove(expiredDebuff); startTimes.Remove(expiredDebuff); }