Comment faire un sprite pivotant
Publié : ven. 19/déc./2014 10:42
Bonjour à tous, je souhaite faire un sprite rotatif, mais je n'arrive pas à afficher la face arrière qui est normalement le miroir de la face avant.
je vous remercie d'avance de vos solution
je vous remercie d'avance de vos solution
Code : Tout sélectionner
InitSprite()
OpenWindow(0, 0, 0, 800, 600, "Ecran", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0), WindowHeight(0), 0, 0, 0)
SpriteQuality(1)
Font = FontID(LoadFont(#PB_Any, "Arial", 192))
CreateSprite(1, 256, 256, #PB_Sprite_AlphaBlending)
StartDrawing(SpriteOutput(1))
DrawingFont(Font) : DrawingMode(1)
Box(0,0,256,256,$FF0000)
DrawText(20, 0, "M", $0000FF, 0)
StopDrawing()
Repeat
ClearScreen(0)
a.f = ElapsedMilliseconds()/1000
ZoomSprite(1, 200*Sin(a), 200)
DisplayTransparentSprite(1, 400-100*Sin(a), 200)
FlipBuffers()
Until WindowEvent() = #PB_Event_CloseWindow