isHud property

bool isHud

Implementation

bool get isHud {
  if (hasGameRef) {
    bool thisIs = gameRef.camera.viewport.contains(this);
    bool parentIs = false;
    if (parent != null) {
      parentIs = gameRef.camera.viewport.contains(parent!);
    }
    return parentIs || thisIs;
  }
  return false;
}