public abstract class MovablePhysObject extends PhysObject implements Runnable
env, twoPI
Constructor and Description |
---|
MovablePhysObject(String s) |
MovablePhysObject(String name,
Shape shape) |
MovablePhysObject(String name,
Shape shape,
Color color,
boolean persistent,
boolean animated) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
encounteredCliff(PhysObject cliff)
This method will be called at least once during an update cycle to indicate
and encounter with a cliff object: once
per encounter, and if there is no encounter, once only with a null parameter.
|
protected abstract void |
encounteredImovableObstical(Area impact)
This method is called to let this object know that it cannot move when
it encounters an immovable object.
|
protected abstract void |
encounteredVWall(PhysObject vWall)
This method will be called at least once during an update cycle to indicate
and encounter with a virtual wall: once
per encounter, and if there is no encounter, once only with a null parameter.
|
protected Shape |
move(Shape oldShape,
Shape newShape) |
allowMovement, compareTo, draw, equals, exit, getAngle, getAngleDeg, getColor, getName, getShape, getShowHeader, getWidth, getX, getY, getZOrder, hasExited, isAnimated, isCliff, isCorporeal, isLabeled, isMovable, isPaint, isPersistent, isVWall, moveTo, normalizeAngle, processMouseEvent, processMouseMoveEvent, replace, replace, setAnimated, setCliff, setColor, setCorporeal, setLabeled, setMovable, setName, setPaint, setPersistent, setShape, setVWall, setZOrder, show, toString
public MovablePhysObject(String name, Shape shape, Color color, boolean persistent, boolean animated) throws Exception
name
- shape
- color
- persistent
- animated
- Exception
public MovablePhysObject(String name, Shape shape) throws Exception
name
- shape
- Exception
protected abstract void encounteredImovableObstical(Area impact)
impact
- The area describing the impact with the other objectprotected abstract void encounteredCliff(PhysObject cliff)
cliff
- Either one of the cliff objects encountered or null if none was
encountered during the update cycle.protected abstract void encounteredVWall(PhysObject vWall)
vWall
- Either one of the cliff objects encountered or null if none was
encountered during the update cycle.