onRemove method

  1. @override
void onRemove()
override

Called right before the component is removed from the game.

Implementation

@override
void onRemove() {
  super.onRemove();
  _gameRef = null;
}