Skip to content

Methods within Games

Joe Williams edited this page Jun 15, 2015 · 3 revisions

create()

  • loading assets
  • creating objects

images, sound, Vector2, camera


resetGame()

  • initial values for game

score = 0, lives = 10...


updateGame()

  • process user inputs

taps, accelerometer...

  • check for win/loss

score > 10, lives == 0, etc.

  • apply game mechanics + update state

gravity, update position


drawGame()

  • draw and write things to screen

background, avatar, Game Over, etc.