Skip to content

Instantly share code, notes, and snippets.

@codetravis
Created November 26, 2016 18:41
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/356e80e231387d59f91045136fc3a9eb to your computer and use it in GitHub Desktop.
Save codetravis/356e80e231387d59f91045136fc3a9eb to your computer and use it in GitHub Desktop.
6.5 Add player update to game's OnUpdate method
' main.monkey
Method OnUpdate()
Local time_delta:Float = Float(engine.CalcDeltaTime())/60.0
' Call the player's Character class update method
player.Update()
If engine.GetPaused() = False
engine.Update(time_delta)
End
End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment