DevToolsService class
When DevToolsService is initialized by the FlameGame it will call
the init
method for all DevToolsConnector
s so that they can register
service extensions which are the ones that makes it possible for the
devtools extension to communicate with the game.
Do note that if you have multiple games in your app, only the last one created will be connected to the devtools. If you want to change it to another game instance you can call DevToolsService.initWithGame with the game instance that you want to observe.
Constructors
-
DevToolsService.initWithGame(FlameGame<
World> game) -
Initializes the service with the given game instance.
factory
Properties
-
connectors
→ List<
DevToolsConnector> -
The list of available connectors, remember to add your connector here if
you create a new one.
final
-
game
→ FlameGame<
World> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
initGame(
FlameGame< World> game) → void -
This method is called every time a new game is set in the service and it
is responsible for calling the
DevToolsConnector.initGame
method in all the connectors. It is also responsible for callingDevToolsConnector.disposeGame
of all connectors when a new game is set, if there was a game set previously. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → DevToolsService
-
final