-
Notifications
You must be signed in to change notification settings - Fork 110
Injecting non artemis dependencies
Daan van Yperen edited this page May 30, 2019
·
3 revisions
@Wire
also supports injecting of non-artemis objects. Note that you explicitly need to annotate these injection fields with @Wire.
Sled sled = new Sled();
world world = new World(new WorldConfiguration()
.register(sled));
public class MySystem extends BaseSystem
{
@Wire
protected Sled sled;
}
world world = new World(new WorldConfiguration()
.register("sled",myObject)
.register("santaName","Phillip")
.register("sledName","Turbo-5000")
.setSystem(MyManager.class));
public class MyManager extends Manager
{
@Wire(name="sled")
protected Sled sled;
@Wire(name="santaName")
protected String santa;
@Wire(name="sledName")
protected String sled;
}
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference