Advertisement
Guest User

Untitled

a guest
Feb 5th, 2015
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Import mojo
  2.  
  3. Function Main:Int()
  4. New Game()
  5. End Function
  6.  
  7. Class Game Extends App
  8. Field hoob:Image
  9.  
  10. Method OnCreate:Int()
  11. SetUpdateRate 60
  12.  
  13.  
  14. Local time:Int = Millisecs()
  15. For Local i:Int = 0 To 10
  16. hoob = LoadImage("background.jpg")
  17. Next
  18. Print Millisecs() -time
  19. End Method
  20.  
  21. Method OnUpdate:Int()
  22. If MouseHit()
  23. Local time:Int = Millisecs()
  24. For Local i:Int = 0 To 10
  25. hoob = LoadImage("background.jpg")
  26. Next
  27. Print Millisecs() -time
  28. End If
  29.  
  30.  
  31. End Method
  32.  
  33. Method OnRender:Int()
  34. Cls()
  35.  
  36. DrawImage(hoob, 64, Rnd(64, 128))
  37. DrawRect(32, 32, Rnd(32, 64), 32)
  38. End Method
  39.  
  40. Method OnLoading:Int()
  41. Cls()
  42. SetColor(255, 0, 0)
  43. DrawCircle(320, 240, 50)
  44. End Method
  45. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement