• This system ensures that all Tween components are properly synchronized across the network by setting their startSyncedTimestamp using the global SyncedClock value.

    The system runs at the end of each frame to ensure that every tween is synchronized before sending that value to the client/network

    For tweens that have already started (have a TweenState with currentTime > 0), it calculates how much time has elapsed and subtracts it from the current syncedTimestamp to determine when the tween actually started.

    The system only processes tweens when:

    1. The SyncedClock component exists and is synchronized (status = SS_SYNCHRONIZED)
    2. The scene's network communications are initialized (isStateSyncronized = true)

    Parameters

    • engine: IEngine

      The ECS engine instance

    • isStateSyncronized: (() => boolean)

      Function that returns whether network comms are ready

        • (): boolean
        • Returns boolean

    Returns void