Animated score effect?
Posted: Sat Mar 24, 2018 12:20 pm
Are there any PB examples of a simple odometer-style number animated score effect, similar to this old C64 game?
https://youtu.be/O5u_RpH79qY?t=4m4s
As you can see, I'm still at square one
https://youtu.be/O5u_RpH79qY?t=4m4s
As you can see, I'm still at square one
Code: Select all
Procedure UpdateScore(x)
SetGadgetText(0,RSet(Str(x),4,"0"))
EndProcedure
OpenWindow(0, 930, 30, 405, 195, "Score",#PB_Window_SystemMenu)
LoadFont(1, "courier new", 34)
SetGadgetFont(-1, FontID(1))
TextGadget(0, 8, 6, 110, 36, "")
AddWindowTimer(0,1,1000)
Repeat
e = WaitWindowEvent()
If e = #PB_Event_Timer
score + Random(100)
updateScore(score)
EndIf
Until e = #PB_Event_CloseWindow
