screenPosition method

Vector2 screenPosition()

Return screen position of this component.

Implementation

Vector2 screenPosition() {
  if (hasGameRef) {
    return gameRef.worldToScreen(
      position,
    );
  }
  return Vector2.zero();
}