public abstract class MovingPlatform extends StageFeature
| Constructor and Description |
|---|
MovingPlatform()
The default constructor
|
MovingPlatform(double x,
double y,
double w,
double h,
int xDir,
int yDir)
The general constructor used to create the moving platforms
|
| Modifier and Type | Method and Description |
|---|---|
abstract java.awt.geom.Line2D |
getContactLine()
Represents a collision detection line for moving platforms
|
abstract void |
interact(GameObject gameObject)
Describes the interation between the moving platform and a game object
|
abstract void |
paint(java.awt.Graphics g)
Paints the moving platform
|
abstract void |
update()
Updates the moving platform
|
changeXDir, changeYDirpublic MovingPlatform()
public MovingPlatform(double x,
double y,
double w,
double h,
int xDir,
int yDir)
x - The spawning x coordinatey - The spawning y coordinatew - The spawning widthh - The spawning heightxDir - The spawning x directionyDir - The spawning y directionpublic abstract java.awt.geom.Line2D getContactLine()
getContactLine in class StageFeaturepublic abstract void paint(java.awt.Graphics g)
paint in class StageFeatureg - An instance of the Graphics objectpublic abstract void update()
update in class StageFeaturepublic abstract void interact(GameObject gameObject)
interact in class StageFeaturegameObject - The game object that the moving platform is interacting with