ClubCardUpdateCardAnimations
Callable
Parameters
Timestamp: number
The current timestamp provided by
GameRun()
, ensuring synchronization with the game loop.How it works:
- Loops through all active animations in
activeAnimations
. - Calculates the progress (0 to 1) of the animation based on elapsed time.
- Applies an ease-in-out effect for smoother movement.
4️. Updates the card's position (
CurrentX
,CurrentY
,CurrentW
). 5️. Once the animation is complete:- Restores the card’s visibility and state.
- Restores the original card’s visibility if needed.
- Calls
onComplete()
if provided. - Removes the animation from
activeAnimations
.
- Loops through all active animations in
Returns void
Updates the positions of all active card animations.
This function is called every frame within
ClubCardRun()
to animate cards smoothly. It updates the position of each animated card based on the elapsed time and removes completed animations from theactiveAnimations
array.