SpineSystem
System responsible for updating all active Spine instances in the application.
SpineSystem is automatically created as a singleton and manages the update lifecycle of all Spine animations. It runs during the late update phase to ensure animations are updated after game logic but before rendering.
The system maintains a list of all Spine instances and updates them each frame based on their autoUpdate and paused/frozen states. This centralized update approach ensures consistent animation timing and efficient batch processing.
Features:
- Automatic registration/unregistration of Spine instances
- Safe iteration that handles additions/removals during updates
- Respects pause/freeze states and autoUpdate flags
- Runs at lateUpdateOrder 4000 for proper timing
This system is used internally by the Spine class and typically doesn't need to be accessed directly by user code.
Static Members
The shared singleton instance of the SpineSystem.
This instance is automatically created on first access and manages all Spine instances in the application. The @lazy metadata ensures it's only created when needed.
Private Members
Master list of all Spine instances registered with the system. Spine instances are automatically added/removed when created/destroyed.
Updates all active Spine animations with the given time delta.
This method is called automatically each frame during the late update phase. It iterates through all registered Spine instances and updates those that:
- Are not paused or frozen
- Have autoUpdate enabled
The update process uses a temporary array to ensure safe iteration even if Spine instances are added or removed during the update cycle.
Name | Type | Description |
---|---|---|
delta |
Float | Time elapsed since the last frame in seconds |
Creates a new SpineSystem instance.
Sets the lateUpdateOrder to 4000, ensuring Spine animations are updated after most game logic but before rendering begins.
Metadata
Name | Parameters |
---|---|
:build |
tracker.macros.EventsMacro.build() |
:autoBuild |
tracker.macros.EventsMacro.build() |
:build |
ceramic.macros.EntityMacro.buildForCompletion() |
:autoBuild |
ceramic.macros.EntityMacro.buildForCompletion() |
:allow |
ceramic.Spine |