Skip to content

Instantly share code, notes, and snippets.

@codetravis
Created December 6, 2016 13:03
Show Gist options
  • Save codetravis/461be1040f851ffe35bda06751e10801 to your computer and use it in GitHub Desktop.
Save codetravis/461be1040f851ffe35bda06751e10801 to your computer and use it in GitHub Desktop.
7.3 Change player creation code to signify that it is a player controlled character
Method OnCreate()
engine = New ftEngine
default_scene = engine.GetDefaultScene()
default_layer = engine.GetDefaultLayer()
Local box:ftObject = engine.CreateBox(120, 20, engine.GetCanvasWidth()/2, engine.GetCanvasHeight()/2)
box.SetColor(0, 70, 70)
box.SetMaxSpeed(20.0)
box.SetMinSpeed(-20.0)
' create the player character
Self.player = New Character(box, True)
End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment