Constructor and Description |
---|
PointHitbox(CellVector relPosition)
Creates a new PointHitbox with the specified relative position.
|
PointHitbox(double relX,
double relY)
Creates a new PointHitbox with the specified relative position.
|
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 |
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.
|
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 PointHitbox(CellVector relPosition)
relPosition
- This PointHitbox's relative positionpublic PointHitbox(double relX, double relY)
relX
- The x-coordinate of this PointHitbox's relative positionrelY
- The y-coordinate of this PointHitbox's relative positionpublic Hitbox<T> getCopy()
Hitbox
public final double getLeftEdge()
Hitbox
getLeftEdge
in class Hitbox<T extends CellGame>
public final double getRightEdge()
Hitbox
getRightEdge
in class Hitbox<T extends CellGame>
public final double getTopEdge()
Hitbox
getTopEdge
in class Hitbox<T extends CellGame>
public final double getBottomEdge()
Hitbox
getBottomEdge
in class Hitbox<T extends CellGame>