Created
January 2, 2017 23:42
-
-
Save codetravis/785f8e4f99e1cfda2847a9b47327f9c8 to your computer and use it in GitHub Desktop.
10.1 Add instructions to the Game Over scene
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
engine.SetDefaultLayer(game_over_layer) | |
Local font:ftFont = engine.LoadFont("vt323_sample_2.txt") | |
Local game_over_text:ftObject = engine.CreateText(font, "GAME OVER", | |
engine.GetCanvasWidth()/2 - 75, engine.GetCanvasHeight()/2 - 50, engine.taTopLeft) | |
' Add instructions to the game over scene | |
Local game_over_instruction:ftObject = engine.CreateText(font, "Press ENTER to Restart", | |
engine.GetCanvasWidth()/4, engine.GetCanvasHeight()/2 + 50, engine.taTopLeft) | |
game_over_scene.SetActive(False) | |
engine.SetDefaultLayer(play_layer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment