Class CircleRendererComponent

java.lang.Object
technology.sola.engine.graphics.components.CircleRendererComponent
All Implemented Interfaces:
technology.sola.ecs.Component

@NullMarked public class CircleRendererComponent extends Object implements technology.sola.ecs.Component
CircleRendererComponent is a Component containing data for rendering 2d circles.
Note: only TransformComponent.getScaleX() is used for size of collider
  • Constructor Details

    • CircleRendererComponent

      public CircleRendererComponent(Color color)
      Creates a CircleRendererComponent of desired color that is filled.
      Parameters:
      color - the Color of the circle
    • CircleRendererComponent

      public CircleRendererComponent(Color color, boolean isFilled)
      Creates a CircleRendererComponent of desired color that is either filled or not filled.
      Parameters:
      color - the Color of the circle
      isFilled - whether the circle should be filled or not
  • Method Details

    • getColor

      public Color getColor()
      Returns:
      the Color of the circle
    • isFilled

      public boolean isFilled()
      Returns:
      true if the circle should be filled when rendered
    • setColor

      public void setColor(Color color)
      Sets the Color for rendering.
      Parameters:
      color - the new color
    • setFilled

      public void setFilled(boolean filled)
      Sets whether the circle should be filled or not.
      Parameters:
      filled - the new filled status