-
Notifications
You must be signed in to change notification settings - Fork 115
EntitySystem
A system is typically an implementation that iteratively operates on a group of entities that share common components (typically EntityProcessingSystem), or just general game logic (typically VoidEntitySystem).
Artemis provides several abstract classes to base your Systems on.
- VoidEntitySystem - Game logic that does not require entity matching.
- EntityProcessingSystem - Process entities matching aspect each tick.
- IntervalEntityProcessingSystem - Process entities matching aspect at fixed ms interval.
- DelayedEntityProcessingSystem - Process entities matching aspect at varied ms interval.
Upon calling world.process()
, your systems are processed in sequence. Override the following methods in your system to integrate your game logic.
-
Initialize()
- Manually initialize your system. (Use @Wire instead!) -
Begin()
- Called before the entities are processed. -
process(Entity e)
- Called for every Aspect matching entity. -
End()
- Called after the entities have been processed.
Systems can communicate with other systems. Retrieve other systems via @Wire. You can define whatever methods you deem necessary for inter-system communication.
Manually initialize aspects of your system by overriding the Initialize method.
Override checkProcessing
to return false if you want to suspend system processing.
You can override added and removed methods in each system. There you will be notified about entities that were either added into or removed from the system.
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference