gameRef property
BonfireGameInterface
get
gameRef
Implementation
BonfireGameInterface get gameRef {
final ref = _gameRef;
if (ref == null) {
throw 'Accessing gameRef before the component was added to the game!';
}
return ref;
}
set
gameRef
(BonfireGameInterface gameRef)
Implementation
set gameRef(BonfireGameInterface gameRef) {
_gameRef = gameRef;
if (this is Component) {
(this as Component)
.children
.whereType<BonfireHasGameRef>()
.forEach((e) => e.gameRef = gameRef);
}
}