public override void Update(GameTime gameTime) { float tmer = (float)gameTime.ElapsedGameTime.TotalSeconds; Move(); if (currentHealth <= 0) { alive = false; Game1.soundDeathRobot.Play(); } Animation(tmer); //Debaff(gameTime); if (debaffs.Count != 0) { Debaff debaffForDelete = null; foreach (Debaff debaff in debaffs) { debaff.Update(gameTime); if (debaff.EndDebaff) { debaffForDelete = debaff; } } if (debaffForDelete != null) { debaffs.Remove(debaffForDelete); } } else { color = Color.White; speed = startSpeed; } base.Update(gameTime); }
public void AddDebaff(Debaff debaff) { debaffs.Add(debaff); }