public class RectPlatform extends StationaryPlatform
| Constructor and Description |
|---|
RectPlatform()
The default constructor
|
RectPlatform(double x,
double y,
double w,
double h)
The general constructor used to create the rectangular platform
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.geom.Line2D |
getContactLine()
Gets the top contact line of the platform's hitbox
|
void |
interact(GameObject gameObject)
Describes the interaction between the platform and the object it is interacting with
|
void |
paint(java.awt.Graphics g)
Draws the platform's hitbox
|
calculateAngle, calculateT, updatechangeXDir, changeYDirpublic RectPlatform()
public RectPlatform(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 StationaryPlatformpublic void paint(java.awt.Graphics g)
paint in class StationaryPlatformg - An instance of the Graphics objectpublic void interact(GameObject gameObject)
interact in class StationaryPlatformgameObject - The object the platform is interacting with