protected override void Update(GameTime gameTime) { PerfMon.UpdateStarted(); if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) { Exit(); } for (var i = 0; i < s_GameObjects.Count; i++) { s_GameObjects[i].Update(gameTime); } base.Update(gameTime); PerfMon.UpdateFinished(); }
protected override void Update(GameTime gameTime) { PerfMon.UpdateStarted(); if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) { Exit(); } var deltaTime = (float)gameTime.ElapsedGameTime.TotalSeconds; foreach (var gameObject in s_GameObjects) { gameObject.Update(deltaTime); } base.Update(gameTime); PerfMon.UpdateFinished(); }
protected override void Update(GameTime gameTime) { PerfMon.UpdateStarted(); if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) { Exit(); } var deltaTime = (float)gameTime.ElapsedGameTime.TotalSeconds; this.moveSystem.Update(deltaTime); this.velocityModifierSystem.Update(deltaTime); base.Update(gameTime); PerfMon.UpdateFinished(); }