default.txt 667 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #IMAGE_FILES="*.png|*.jpg"
  2. #SOUND_FILES="*.wav|*.ogg"
  3. #MUSIC_FILES="*.wav|*.ogg"
  4. #BINARY_FILES="*.bin|*.dat"
  5. Import mojo
  6. ' The main class which expends Mojo's 'App' class:
  7. Class GameApp Extends App
  8. Field player:Player
  9. Method OnCreate:Int()
  10. Local img:Image = LoadImage("player.png")
  11. Self.player = New Player()
  12. SetUpdateRate(60)
  13. Return 0
  14. End
  15. Method OnUpdate:Int()
  16. player.x += HALFPI
  17. If (player.x > 100) Then
  18. player.x = 0
  19. Endif
  20. Return 0
  21. End
  22. Method OnRender:Int()
  23. Cls(32, 64, 128)
  24. player.Draw()
  25. player = Null
  26. Return 0
  27. End
  28. End