Animationen
Verfasst: 15.11.2006 18:13
Kann mir jemand erklären, wie man Animationen wie bei Waponez II erstellt ??
Code: Alles auswählen
For i=0 To 20
CreateImage(i, 100,100)
StartDrawing( ImageOutput(i) )
Circle(50,50, i, 255-i*10 )
StopDrawing()
Next
hWin=OpenWindow(0, 50,150,140,140, "")
CreateGadgetList(hWin)
ImageGadget(0, 20,20, 1,1, ImageID(0) , #PB_Image_Border)
Repeat
img+1
If img>20
img=0
EndIf
SetGadgetState(0, ImageID(img) )
Delay(100)
Until WindowEvent()=#PB_Event_CloseWindow
Code: Alles auswählen
Dim anim(20)
For i=0 To 20
anim(i)=CreateImage(#PB_Any, 100,100)
StartDrawing( ImageOutput(anim(i)) )
Circle(50,50, i, 255-i*10 )
StopDrawing()
Next
hWin=OpenWindow(0, 50,150,140,140, "")
CreateGadgetList(hWin)
ImageGadget(0, 20,20, 1,1, ImageID(anim(0)) , #PB_Image_Border)
Repeat
img+1
If img>20
img=0
EndIf
SetGadgetState(0, ImageID(anim(img)) )
Delay(100)
Until WindowEvent()=#PB_Event_CloseWindow