Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EnableExplicit
- Structure Planet
- power.l
- resources.l
- x.l
- y.l
- EndStructure
- Global Player.Planet
- Global Window_Index.i
- Global Gadget.i
- Window_Index = OpenWindow(#PB_Any, 0, 0, 600, 600, "Test", #PB_Window_ScreenCentered)
- CreateImage(0, 600, 600, 24)
- ImageGadget(0, 0, 0, 600, 600, ImageID(0))
- Procedure Draw()
- StartDrawing(ImageOutput(0)) ;{
- Box(0, 0, 600, 600, RGB(255, 255, 255))
- Circle(Player\x, Player\y, Player\power, RGB(123, 111, 222))
- StopDrawing() ;}
- SetGadgetState(0, ImageID(0))
- EndProcedure
- Player\power = 10
- Player\resources = 100
- Player\x = 300
- Player\y = 450
- Global Event.i
- Repeat
- Repeat
- Event = WindowEvent()
- If Event = #PB_Event_CloseWindow
- End
- Endif
- Until Event = 0
- Draw()
- Delay(1)
- ForEver
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement