Advertisement
Guest User

Untitled

a guest
Jun 4th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. EnableExplicit
  2.  
  3. Structure Planet
  4. power.l
  5. resources.l
  6. x.l
  7. y.l
  8. EndStructure
  9.  
  10. Global Player.Planet
  11. Global Window_Index.i
  12. Global Gadget.i
  13.  
  14. Window_Index = OpenWindow(#PB_Any, 0, 0, 600, 600, "Test", #PB_Window_ScreenCentered)
  15. CreateImage(0, 600, 600, 24)
  16. ImageGadget(0, 0, 0, 600, 600, ImageID(0))
  17.  
  18. Procedure Draw()
  19. StartDrawing(ImageOutput(0)) ;{
  20. Box(0, 0, 600, 600, RGB(255, 255, 255))
  21. Circle(Player\x, Player\y, Player\power, RGB(123, 111, 222))
  22. StopDrawing() ;}
  23. SetGadgetState(0, ImageID(0))
  24. EndProcedure
  25.  
  26. Player\power = 10
  27. Player\resources = 100
  28. Player\x = 300
  29. Player\y = 450
  30.  
  31. Global Event.i
  32.  
  33. Repeat
  34. Repeat
  35. Event = WindowEvent()
  36. If Event = #PB_Event_CloseWindow
  37. End
  38. Endif
  39. Until Event = 0
  40. Draw()
  41. Delay(1)
  42. ForEver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement