/// <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(); } double realGameTime = gameTime.ElapsedGameTime.Milliseconds; _managerInput.Update(realGameTime); _managerScreen.Update(realGameTime); 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(); } // TODO: Add your update logic here _managerNetwork.Update(); _managerInput.Update(gameTime.ElapsedGameTime.Milliseconds); _managerPlayers.Update(gameTime.ElapsedGameTime.Milliseconds); _managerEnemies.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); }