mini_arcade_core.scenes.systems.system_pipeline¶
Pipeline for managing and executing systems in order. Defines the SystemPipeline dataclass that holds and runs systems.
Classes¶
Pipeline for managing and executing systems in order. |
Module Contents¶
- class mini_arcade_core.scenes.systems.system_pipeline.SystemPipeline[source]¶
Bases:
Generic[mini_arcade_core.scenes.systems.base_system.TSystemContext]Pipeline for managing and executing systems in order.
- Variables:
(List[BaseSystem[TSystemContext]]) (systems) – List of systems in the pipeline.
- systems: List[mini_arcade_core.scenes.systems.base_system.BaseSystem[mini_arcade_core.scenes.systems.base_system.TSystemContext]] = []¶
- add(system: mini_arcade_core.scenes.systems.base_system.BaseSystem[mini_arcade_core.scenes.systems.base_system.TSystemContext])[source]¶
Add a system to the pipeline and sort by order.
- Parameters:
system (BaseSystem[TSystemContext]) – The system to add.
- extend(systems: Iterable[mini_arcade_core.scenes.systems.base_system.BaseSystem[mini_arcade_core.scenes.systems.base_system.TSystemContext]])[source]¶
Extend the pipeline with multiple systems.
- Parameters:
systems (Iterable[BaseSystem[TSystemContext]]) – An iterable of systems to add.
- step(ctx: mini_arcade_core.scenes.systems.base_system.TSystemContext)[source]¶
Execute a step for each system in the pipeline.
- Parameters:
ctx (TSystemContext) – The system context.