/// <summary> /// Update all the game component /// </summary> /// <param name="gameTime"></param> /// <param name="otherScreenHasFocus"></param> /// <param name="coveredByOtherScreen"></param> public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { if (IsActive && !gameOver) { if (!startScreen) { // Calculate the time from the start of the game this.gameTime += gameTime.ElapsedGameTime; CheckFallInPit(); UpdateLastCheackpoint(); } // Update all the component of the game maze.Update(gameTime); marble.Update(gameTime); camera.Update(gameTime); CheckGameFinish(); base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen); } if (startScreen) { if (startScreenTime.Ticks > 0) { startScreenTime -= gameTime.ElapsedGameTime; } else { startScreen = false; } } }
/// <summary> /// Update all the game component /// </summary> /// <param name="gameTime"></param> /// <param name="otherScreenHasFocus"></param> /// <param name="coveredByOtherScreen"></param> public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { // Update all the component of the game maze.Update(gameTime); marble.Update(gameTime); camera.Update(gameTime); }
/// <summary> /// Update all the game component /// </summary> /// <param name="gameTime"></param> /// <param name="otherScreenHasFocus"></param> /// <param name="coveredByOtherScreen"></param> public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { // Calculate the time from the start of the game this.gameTime += gameTime.ElapsedGameTime; CheckFallInPit(); UpdateLastCheackpoint(); // Update all the component of the game maze.Update(gameTime); marble.Update(gameTime); camera.Update(gameTime); CheckGameFinish(); base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen); }