public override void Update(double gameTime) { _entities.Update(gameTime); _managerMap.Update(gameTime); _managerCamera.Update(gameTime); _managerEvents.Update(gameTime); }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) { Exit(); } // TODO: Add your update logic here _mouse.Update(gameTime.ElapsedGameTime.Milliseconds); _map.Update(gameTime.ElapsedGameTime.Milliseconds); _managerInput.Update(gameTime.ElapsedGameTime.Milliseconds); _managerCamera.Update(gameTime.ElapsedGameTime.Milliseconds); base.Update(gameTime); }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) { Exit(); } _managerInput.Update(gameTime.ElapsedGameTime.Milliseconds); _managerMap.Update(gameTime.ElapsedGameTime.Milliseconds); _managerCamera.Update(gameTime.ElapsedGameTime.Milliseconds); _player.Update(gameTime.ElapsedGameTime.Milliseconds); _pnj1.Update(gameTime.ElapsedGameTime.Milliseconds); _enemy1.Update(gameTime.ElapsedGameTime.Milliseconds); base.Update(gameTime); }