public void Draw(GameTime GameTime, SpriteBatch SpriteBatch) { DamageFloatingTextList.ForEach((x) => { x.SpriteNumericField.Draw(GameTime, SpriteBatch); #if DEBUG DebugLine dL = new DebugLine(Color.Red); dL.Update(Cursor.Instance.CurrentFlipbook.Position, x.SpriteNumericField.Position); dL.Draw(SpriteBatch); #endif }); }
public void Update(GameTime GameTime) { DamageFloatingTextList.ForEach((x) => { x.Update(GameTime); if (x.IsExpired) { UnusedFloatingTextList.Add(x); } }); UnusedFloatingTextList.ForEach((x) => DamageFloatingTextList.Remove(x)); UnusedFloatingTextList.Clear(); }
public void AddDamage(Actor Owner, int Value) { for (int i = 0; i < DamageFloatingTextList.Count; i++) { if (DamageFloatingTextList[i].Owner == Owner) { DamageFloatingTextList[i].AddValue(Value); return; } } DamageFloatingText floatingText = new DamageFloatingText(Owner); floatingText.AddValue(Value); DamageFloatingTextList.Add(floatingText); }