Skip to content

Instantly share code, notes, and snippets.

@codetravis
Created January 2, 2017 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codetravis/785f8e4f99e1cfda2847a9b47327f9c8 to your computer and use it in GitHub Desktop.
Save codetravis/785f8e4f99e1cfda2847a9b47327f9c8 to your computer and use it in GitHub Desktop.
10.1 Add instructions to the Game Over scene
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