-
Notifications
You must be signed in to change notification settings - Fork 115
World
Adrian Papari edited this page Jul 19, 2015
·
18 revisions
World
Provides a context to manage all your entities, systems, components and managers. Each world instance is isolated from other world instances.
Typically you start your game by instancing a world and a WorldConfiguration. The world configuration is used for registering objects for dependency injection, configuration parameters, and configures any managers and entity systems your game needs. Upon world instantiation, all systems and managers are initialized and have Dependency Injection resources injected. Instancing entities and loading assets are typically delegated to your systems and managers.
World world = new World(new WorldConfiguration(
// class references are valid as long as the
// system or manager provides a no-arg constructor.
.setManager(GroupManager.class)
.setManager(agManager.class)
.setManager(new MyCustomManager())
.setSystem(new MyCustomSystem1())
..
.setSystem(new MyCustomSystemN()));
For a typical game, you will call the following piece of code each update tick. :
world.setDelta(delta);
world.process();
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference