You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: playground/core-concepts/core-3-game-manager.md
+47Lines changed: 47 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,53 @@ public class Referee extends AbstractReferee {
73
73
74
74
The Game Manager's API will thus work with your `Player` class, which you may modify at leisure.
75
75
76
+
## Working with Guice
77
+
78
+
Using Guice in your own code is totally optional but since the SDK uses injections to handle the instantiation of its different components, it is important to note a few things:
79
+
- An injected field will be instantiated by Guice, those fields with `@Inject` will always be `null` if you instantiate the class yourself using the `new` operator.
80
+
- Any simple class can be injected into your `Referee` and you can inject the `Referee` or `GraphicEntityModule` into any simple class.
81
+
- Writing a lot of Guice code may cause the game to slow down.
0 commit comments