public class Checkpoint extends Prop
| Modifier and Type | Field and Description |
|---|---|
boolean |
hasBeenReached
Identifies if Sonic has already reached this checkpoint before
|
| Constructor and Description |
|---|
Checkpoint()
The default constructor
|
Checkpoint(double x,
double y,
double w,
double h)
The general constructor which creates the checkpoint
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.geom.Line2D |
getContactLine()
Gets the top contact line of the checkpoint's hitbox
|
java.awt.geom.Line2D |
getLeftContactLine()
Gets the left contact line of the checkpoint's hitbox
|
java.awt.geom.Line2D |
getRightContactLine()
Gets the right contact line of the checkpoint's hitbox
|
void |
interact(GameObject gameObject)
Describes the interaction between the checkpoint and the object it is interacting with
|
void |
paint(java.awt.Graphics g)
Draws the hitbox of the checkpoint
|
void |
update()
An empty function body since checkpoint does not update
|
changeXDir, changeYDirpublic boolean hasBeenReached
public Checkpoint()
public Checkpoint(double x,
double y,
double w,
double h)
x - The x coordinate of the objecty - The y coordinate of the objectw - The width of the objecth - The height of the objectpublic java.awt.geom.Line2D getContactLine()
getContactLine in class Proppublic java.awt.geom.Line2D getRightContactLine()
public java.awt.geom.Line2D getLeftContactLine()
public void paint(java.awt.Graphics g)
public void update()
public void interact(GameObject gameObject)