onSetIfVisible method

  1. @override
void onSetIfVisible()
override

Implementation

@override
void onSetIfVisible() {
  super.onSetIfVisible();
  if (isVisible) {
    gameRef.lighting?.addVisibleLighting(this);
  } else {
    gameRef.lighting?.removeVisibleLighting(this);
  }
}