public abstract class Prop extends GameObject
| Constructor and Description |
|---|
Prop()
The default constructor
|
Prop(double x,
double y,
double w,
double h)
The general constructor used to create the prop
|
| Modifier and Type | Method and Description |
|---|---|
abstract java.awt.geom.Line2D |
getContactLine()
Represents a collision detection line for props
|
abstract void |
interact(GameObject gameObject)
Describes the interation between the prop and a game object
|
abstract void |
paint(java.awt.Graphics g)
Paints the prop
|
abstract void |
update()
Updates the prop
|
changeXDir, changeYDirpublic Prop()
public Prop(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 abstract java.awt.geom.Line2D getContactLine()
getContactLine in class GameObjectpublic abstract void paint(java.awt.Graphics g)
paint in class GameObjectg - An instance of the Graphics objectpublic abstract void update()
update in class GameObjectpublic abstract void interact(GameObject gameObject)
interact in class GameObjectgameObject - The game object that the prop is interacting with