示例#1
0
        public override void Update(GameTime gameTime)
        {
            if (!gameOver)
            {
                gameOver = (player.Health.Value <= 0);
                if (gameOver)
                {
                    MediaPlayer.Stop();
                }
                player.Update(gameTime);


                tunnel.Update(gameTime);
                bulletManager.Update(gameTime);
                asteroidManager.Update(gameTime);
                pgen.Update(gameTime);
                if (tunnel.getColliding(player.Position, 1.0f))
                {
                    player.damage(100);
                }

                asteroidManager.checkCollisions(gameTime);
                bulletManager.CheckCollisions(asteroidManager.AllAsteroids);

                // Update all other game components
                base.Update(gameTime);
            }
        }