public void Update(float deltaTime) { List <Effect> effectsEllapced = new List <Effect>(); foreach (Effect e in effects) { if (e.hasElapsed()) { e.OnTimeoutElapsed(entity); effectsEllapced.Add(e); } else { e.Update(entity, deltaTime); } } foreach (Effect e in effectsEllapced) { effects.Remove(e); } effectsEllapced.Clear(); if (UpdateStrategy != null) { UpdateStrategy.Update(entity, deltaTime); } circle.Position = Position; circle.Rotation = Rotation; circle.Scale = Scale; circle.Radius = Radius; }
public void Update(Item item) { _updateStrategy.Update(item); }