WarTornLands.Level.Update C# (CSharp) Method

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void
        public override void Update(GameTime gameTime)
        {
            try
            {
                foreach (Entity ent in _dynamics)
                {
                    ent.Update(gameTime);
                    if (ent.GetHealth() == 0)
                    {
                        ent.OnDie();
                        _dynamics.Remove(ent);
                        GC.Collect();
                    }
                }
            }
            catch { }
        }