gale.ecs.system module
This file contains the implementation of the class System, the base for any piece of per-frame logic that operates on a gale.ecs.World’s entities, and SystemScheduler, a small orchestrator that runs an ordered list of systems every frame.
Author: Alejandro Mujica (aledrums@gmail.com)
- class gale.ecs.system.System[source]
Bases:
objectBase class for any system: a piece of logic that queries a World for entities with a given combination of components and does something with them every frame, such as integrating physics, decaying fatigue, or checking collisions. Subclasses should override update.
- class gale.ecs.system.SystemScheduler(systems)[source]
Bases:
objectRuns an ordered list of systems against a World every frame, mirroring how gale.state.StateMachine is a separate small orchestrator instead of baking dispatch into BaseState: SystemScheduler only knows how to run systems in order, it does not own or know anything about the World’s storage.
Usage example:
scheduler = SystemScheduler([MovementSystem(), FatigueSystem()])
# Every frame: scheduler.update(world, dt)
- Parameters:
systems (List[System])