The OnObjectUpdate
method has one parameter, the object that is updated.
g.player
.Method OnObjectUpdate:Int(obj:ftObject) If obj = g.player Then
1.5
times the engine delta
field value to the object (player) with the AddSpeed
method. Also, spawn a player engine particle with g.SpawnPlayerEngine
.If KeyDown(KEY_UP) 'Speed up obj.AddSpeed(1.5*delta) g.SpawnPlayerEngine() Endif
15*delta
degrees relative to its current angle with SetAngle
.If KeyDown(KEY_LEFT) 'turn left obj.SetAngle(-15.0 * delta,True) Endif
+15*delta
degrees relative to its current angle with SetAngle
.If KeyDown(KEY_RIGHT) 'turn right obj.SetAngle(15.0 * delta,True) Endif
g.SpawnPlayerShot
.If KeyHit(KEY_S) 'Shoot your gun g.SpawnPlayerShot() Endif
g.ActivateShield
.'Fire up shield If KeyHit(KEY_SPACE) And g.shield.isActive= False Then g.ActivateShield() Endif Endif Return 0 End
3.135.206.254