-
Notifications
You must be signed in to change notification settings - Fork 115
EntitySystem
A system is typically encapsulate a bit of game logic, typically operating on a family of entities.
For an active process you need to model, or stepping over entities that match a certain profile, implement an EntityProcessingSystem, EntitySystem
, or any of the other systems.
If you need to serve or organize objects and assets (components, entities, fonts, graphics, sounds), use managers instead.
Utility methods can be implemented as either managers or Base entity systems.
-
BaseSystem - Blank, invoked by
world.process()
-
EntitySystem - Subscribe to matching entities.
-
EntityProcessingSystem - Run operation on matching entities.
- IntervalEntityProcessingSystem - .. with fixed interval.
- DelayedEntityProcessingSystem - .. with varied interval.
-
EntityProcessingSystem - Run operation on matching entities.
-
EntitySystem - Subscribe to matching entities.
See World how to register systems.
Your registered systems are called in the order added to WorldConfiguration.
Systems can access other systems. Simply expose methods and use @Wire.
Override #Initialize()
to initialize your system, not your constructor. Initialize is called after dependency injection.
class MySystem extends BaseSystem {
@Override
public Initialize()
{
// custom initialization.
}
}
Override checkProcessing
to return false if you want to skip the system during processing.
You can override added
and removed
methods in each system. There you will be notified about entity changes.
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference