Esempio n. 1
0
        /// <summary>
        /// Updates the world and all entities.
        /// </summary>
        /// <param name="gameTime">Timing information.</param>
        public void Update(GameTime gameTime)
        {
            // Minimum of 30 updates per second
            World.Step(MathHelper.Min(
                           (float)gameTime.ElapsedGameTime.TotalSeconds,
                           1f / 30f));

            int count = _Entities.Count;

            for (int i = count - 1; i >= 0; i--)
            {
                _Entities[i].Update(gameTime);
            }
        }