Time for action — creating the Game Over layout
Our players also need a screen for when they lose or win the game, so let's make this layout now.
1. Now create the layout
GameOver
with layersText
andBackground
and its event sheetGameOver Events
. Set this layout size to800, 600
.2. On the
Background
layer, create aPanel
object stretched across the entire layout calledBackgroundRed
and set its colorFilter
toWebRed
.3. Next, on the
Text
layer, create threeText
objects:GameOver, GameSummary
, andAnyKeyText
with the default text ofGame Over, You ran out of lives.
, andPress any key to return to the title screen..
. respectively:4. Switch to the
Event Sheet Editor
and add aStart of layout
event to play the music fileAppPath & "Title.mp3
", and set it toLoop
.5. Add sub-events to compare when
GameWonLost
is equal to1
and another for when it is equal to 2.6. In the first sub-event, add actions to set the text of
GameSummary
to"You ran out of lives.
" and theFilter
ofBackgroundRed...