Class Boundary
- java.lang.Object
-
- net.egartley.beyondorigins.core.logic.interaction.Boundary
-
- Direct Known Subclasses:
EntityBoundary
,MapSectorChangeBoundary
public abstract class Boundary extends java.lang.Object
An imaginary boundary, or border, with a width, height and coordinates
-
-
Field Summary
Fields Modifier and Type Field Description int
bottom
Bottom side of the boundary, which is the y-coordinate + heightorg.newdawn.slick.Color
drawColor
The current color that is being used while renderingint
height
The boundary's height (includes padding)(package private) int
horizontalOffset
boolean
isCollided
Whether or not the boundary is collided with anotherboolean
isVisible
int
left
Left side of the boundary, which is the x-coordinate(package private) BoundaryOffset
offset
This boundary's offset (change in its coordinate)(package private) BoundaryPadding
padding
This boundary's padding (extra space added/subtracted from any or all of the four sides)int
right
Right side of the boundary, which is the x-coordinate + widthint
top
Top side of the boundary, which is the y-coordinate(package private) int
verticalOffset
int
width
The boundary's width (includes padding)int
x
Absolute x-coordinateint
y
Absolute y-coordinate
-
Constructor Summary
Constructors Constructor Description Boundary()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Rectangle
asRectangle()
void
draw(org.newdawn.slick.Graphics graphics)
Renders the boundaryvoid
tick()
java.lang.String
toString()
-
-
-
Field Detail
-
x
public int x
Absolute x-coordinate
-
y
public int y
Absolute y-coordinate
-
horizontalOffset
int horizontalOffset
-
verticalOffset
int verticalOffset
-
width
public int width
The boundary's width (includes padding)
-
height
public int height
The boundary's height (includes padding)
-
top
public int top
Top side of the boundary, which is the y-coordinate
-
right
public int right
Right side of the boundary, which is the x-coordinate + width
-
bottom
public int bottom
Bottom side of the boundary, which is the y-coordinate + height
-
left
public int left
Left side of the boundary, which is the x-coordinate
-
isCollided
public boolean isCollided
Whether or not the boundary is collided with another
-
isVisible
public boolean isVisible
-
padding
BoundaryPadding padding
This boundary's padding (extra space added/subtracted from any or all of the four sides)
-
offset
BoundaryOffset offset
This boundary's offset (change in its coordinate)
-
drawColor
public org.newdawn.slick.Color drawColor
The current color that is being used while rendering
-
-
Method Detail
-
draw
public void draw(org.newdawn.slick.Graphics graphics)
Renders the boundary- Parameters:
graphics
- Graphics object to use
-
tick
public void tick()
-
asRectangle
public java.awt.Rectangle asRectangle()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-