Skip to main content

ClubCardUpdateCardAnimations

Callable

  • ClubCardUpdateCardAnimations(Timestamp: number): 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 the activeAnimations array.


    Parameters

    • Timestamp: number

      The current timestamp provided by GameRun(), ensuring synchronization with the game loop.

      How it works:

      1. Loops through all active animations in activeAnimations.
      2. Calculates the progress (0 to 1) of the animation based on elapsed time.
      3. 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.

    Returns void