Constructor and Description |
---|
CircleHitbox(CellVector relPosition,
double radius)
Creates a new CircleHitbox with the specified relative position and
radius.
|
CircleHitbox(double relX,
double relY,
double radius)
Creates a new CircleHitbox with the specified relative position and
radius.
|
Modifier and Type | Method and Description |
---|---|
double |
getBottomEdge()
Returns the y-coordinate of this Hitbox's absolute bottom boundary.
|
Hitbox<T> |
getCopy()
Returns a copy of this Hitbox with its relative position at the origin
that is not flipped or rotated.
|
double |
getLeftEdge()
Returns the x-coordinate of this Hitbox's absolute left boundary.
|
double |
getRadius()
Returns this CircleHitbox's radius.
|
double |
getRightEdge()
Returns the x-coordinate of this Hitbox's absolute right boundary.
|
double |
getTopEdge()
Returns the y-coordinate of this Hitbox's absolute top boundary.
|
boolean |
setRadius(double radius)
Sets this CircleHitbox's radius to the specified value.
|
angleTo, changeRelAngle, changeRelPosition, changeRelPosition, changeRelX, changeRelY, distanceTo, getAbsAngle, getAbsAngleX, getAbsAngleY, getAbsPosition, getAbsX, getAbsXFlip, getAbsXSign, getAbsY, getAbsYFlip, getAbsYSign, getComponentOf, getGameState, getObject, getRelAngle, getRelAngleX, getRelAngleY, getRelPosition, getRelX, getRelXFlip, getRelXSign, getRelY, getRelYFlip, getRelYSign, isSolid, overlap, overlaps, relFlipX, relFlipY, setRelAngle, setRelPosition, setRelPosition, setRelX, setRelXFlip, setRelY, setRelYFlip, setSolid, setSurfaceSolid, surfaceIsSolid
public CircleHitbox(CellVector relPosition, double radius)
relPosition
- This CircleHitbox's relative positionradius
- This CircleHitbox's radiuspublic CircleHitbox(double relX, double relY, double radius)
relX
- The x-coordinate of this CircleHitbox's relative positionrelY
- The y-coordinate of this CircleHitbox's relative positionradius
- This CircleHitbox's radiuspublic Hitbox<T> getCopy()
Hitbox
public final double getRadius()
public final boolean setRadius(double radius)
radius
- The new radiuspublic double getLeftEdge()
Hitbox
getLeftEdge
in class Hitbox<T extends CellGame>
public double getRightEdge()
Hitbox
getRightEdge
in class Hitbox<T extends CellGame>
public double getTopEdge()
Hitbox
getTopEdge
in class Hitbox<T extends CellGame>
public double getBottomEdge()
Hitbox
getBottomEdge
in class Hitbox<T extends CellGame>