Why this doesn't do anything?

Monkey Targets Forums/HTML5/Why this doesn't do anything?

Yoda(Posted 2012) [#1]
Strict
Import mojo

Class naughtygnom Extends App

Field titel:Image
Field gamestatus:String

'---------------------------------------------------------------------
Method OnCreate:Int ()

titel = LoadImage ("titel.png")
'there is a file titel.png in the naughtygnom.data folder!

gamestatus="gameover"


Return 0
End 'on create
'----------------------------------------------------------------------
Method OnUpdate:Int ()


Return 0
End 'on update
'-----------------------------------------------------------------------
Method OnRender:Int ()

Cls 255,255,255

'DRAW GAME OVER
If gamestatus="gameover"
DrawImage titel,40,50
End If 'gamestatus gameover

Return 0
End 'on render
'--------------------------------------------------------------------------
End 'class
'--------------------------------------------------------------------------
Function Main:Int ()
New naughtygnom
Return 0
End 'main


DruggedBunny(Posted 2012) [#2]
Not tried it, but you seem to be missing SetUpdateRate in OnCreate.


therevills(Posted 2012) [#3]
but you seem to be missing SetUpdateRate in OnCreate.


Yep that looks like the issue to me too, why isnt the update rate set to 30 or something as default in the first place!?