Module technology.sola.engine
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
Note: only
Component
containing data for rendering 2d circles.
Note: only
TransformComponent.getScaleX()
is used for size of collider-
Constructor Summary
ConstructorsConstructorDescriptionCircleRendererComponent
(Color color) Creates a CircleRendererComponent of desired color that is filled.CircleRendererComponent
(Color color, boolean isFilled) Creates a CircleRendererComponent of desired color that is either filled or not filled. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface technology.sola.ecs.Component
afterDeserialize
-
Constructor Details
-
CircleRendererComponent
Creates a CircleRendererComponent of desired color that is filled.- Parameters:
color
- theColor
of the circle
-
CircleRendererComponent
Creates a CircleRendererComponent of desired color that is either filled or not filled.- Parameters:
color
- theColor
of the circleisFilled
- whether the circle should be filled or not
-
-
Method Details
-
getColor
- Returns:
- the
Color
of the circle
-
isFilled
public boolean isFilled()- Returns:
- true if the circle should be filled when rendered
-
setColor
Sets theColor
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
-