Beispiel #1
0
        /// <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)
        {
            screenManager.Update(gameTime, this);

            if (screenManager.CurrentGameState == GameState.Game)
            {
                // TODO: Add your update logic here

                KeyboardState keyBoard = Keyboard.GetState();



                // if (keyBoard.IsKeyDown(Keys.L))
                //     tiles.levelIncrement();

                player.update(gameTime);

                camera.lookAt(player.Position);
                camera.Update(gameTime);

                hud.Update(gameTime);

                pickupManager.update(gameTime);

                gateManager.update(gameTime);

                backgroundManager.update(gameTime, player);

                m_EnemyManager.update(gameTime);

                boss.update(gameTime);
            }
            base.Update(gameTime);
        }