isVisibleInCamera method

  1. @override
bool isVisibleInCamera(
  1. GameComponent c
)
override

Used to check if a component is visible in the camera.

Implementation

@override
bool isVisibleInCamera(GameComponent c) {
  if (!hasLayout) return false;
  if (c.isRemoving) return false;
  return camera.canSee(c);
}