xecs.RealTimeApp#
- class xecs.RealTimeApp(num_entities)[source]#
Bases:
object
An app which runs in real time.
- Parameters:
num_entities (int) – The maximum number of entities which can be spawned.
Methods
Add a plugin.
Add a preallocated pool of components.
Add a resource.
Add a startup system.
Add a system.
Run the app continuously.
Run the app for a single step.
- add_plugin(plugin)[source]#
Add a plugin.
- Parameters:
plugin (RealTimeAppPlugin) – The plugin.
- Return type:
None
- add_pool(pool)[source]#
Add a preallocated pool of components.
The pool will be used to hold any components which are spawned during runtime.
- Parameters:
pool (ComponentPool[ComponentT]) – The component pool.
- Return type:
None
- add_resource(resource)[source]#
Add a resource.
- Parameters:
resource (Resource) – The resource.
- Return type:
None