gameRef property
T
get
gameRef
inherited
Reference to the top-level Game instance that owns this component.
This property is accessible in the component's onLoad and later. It may
be accessible earlier too, but only if your game uses the
SingleGameInstance mixin.
Implementation
T get gameRef => _game ??= _findGameAndCheck();
set
gameRef
(T? value)
inherited
Allows you to set the game instance explicitly. This may be useful in tests, or if you're planning to move the component to another game instance.
Implementation
set gameRef(T? value) => _game = value;