Strict
Import Mojo
Class pongo Extends App
Method OnCreate:Int()
SetUpdateRate(60)
Return True
End
Method OnUpdate:Int()
Return True
End
Method OnRender:Int()
Cls
DrawPlayField()
Return True
End
Method DrawPlayField:Int()
DrawRect(0,0,640,5)
DrawRect(0,475,640,5)
For Local i:= 5 To 465 Step 20
DrawRect(318,i,4,10)
Next
Return True
End
End
Function Main:Int()
Print ("Hello World")
new pongo
Return True
End
Monkey runtime error: Rendering operations can only be performed inside OnRender
//Vboxsvr/vbox/MonkeyDemo45c/modules/Mojo/graphics.monkey<237>
//Vboxsvr/vbox/MonkeyDemo45c/modules/Mojo/graphics.monkey<381>
//Vboxsvr/vbox/MonkeyDemo45c/tmp/untitled1.monkey<13>
//Vboxsvr/vbox/MonkeyDemo45c/modules/Mojo/app.monkey<72>