HTML and CSS Reference
In-Depth Information
Objective complete - mini debriefing
We completed the task of seing up the scene. We have deined two scenes: the game play
scene and the game over scene. We have created a buton in the game over scene that starts
the game again. We have also added a temporary code to trigger the game over scene after
a delay of 3 seconds. After the game logic flow is ready, we will remove the temporary code
that triggers the game over state.
Classified intel
Scene management provides a central place to control the game flow so that we can change
the game state whenever needed.
There are two scenes in this game: the game scene and the game over scene.
The game autostarts when it is loaded. When the player hits any obstacles, the game ends
with an overlay of the game over scene.
The game over scene has a half-transparent background. When the game over scene
appears, we want the game scene to stay so the player can know how the game ends.
The following figure shows how the game scene is unchanged and the game over scene
moves in from the right-hand side:
That's why the game flow only controls the visibility of the game over scene.
Search WWH ::

Custom Search