Works like JavaFX, you can easily keep all the main elements you wish to
store as instance variables as annotated fields. It casts the elements
based on compatibility, so if the item loaded from your Overlap2D
project does not match the field type, your application will crash.
Injection works with any object type, not just stages, so you can inject
into simple struct like objects or more. Injection may only be called
after the scene loader has loaded a scene.
Works like JavaFX, you can easily keep all the main elements you wish to store as instance variables as annotated fields. It casts the elements based on compatibility, so if the item loaded from your Overlap2D project does not match the field type, your application will crash.
Injection works with any object type, not just stages, so you can inject into simple struct like objects or more. Injection may only be called after the scene loader has loaded a scene.
Really this is only done as a fun convenience.