Exemple #1
0
        public override void Update(GameTime gameTime)
        {
            World.Step(gameTime.ElapsedGameTime.Milliseconds * 1e-3f);
            Debug.Update(gameTime);
            Background.Update(gameTime);
            Cursor.Update(gameTime, CameraOperator, World);
            Entities.Update(gameTime, CameraOperator, World);
            Terrain.Update(gameTime, CameraOperator);
            CameraOperator.Update(gameTime, Entities, Factor);
            HUD.Update(gameTime);

            if (Factor < -.1f && _colorFactor == 0)
            {
                Wait.Until(time =>
                {
                    _colorFactor = time.Alive;
                    return(_colorFactor >= 1);
                },
                           () =>
                {
                    InfiniteIsland.GameState = new HighScore(Game, Coins);
                    InfiniteIsland.GameState.LoadContent();
                });
                MediaPlayer.Stop();
            }
        }