group1.model.gameobject.terrain
Class Terrain
java.lang.Object
group1.model.gameobject.GameObj
group1.model.gameobject.terrain.Terrain
- Direct Known Subclasses:
- EnvironmentBoundary, Ground
public class Terrain
- extends GameObj
A GameObj that represents unmoving, solid ground.
Constructor Summary |
Terrain()
Default constructor. |
Terrain(double x,
double y,
double w,
double h,
PictureList p)
Constructor. |
Terrain(double w,
double h,
PictureList p)
Constructor, with position defaulted to (0, 0). |
Method Summary |
XYPair |
move(Environment env)
Ask the object where it wants to move (which would be, quite simply, nowhere). |
Methods inherited from class group1.model.gameobject.GameObj |
addRegion, addRegion, equals, getAcceleration, getAccelerationX, getAccelerationY, getFilm, getFilm, getHeight, getID, getNumRegions, getPictureList, getPosition, getPositionX, getPositionY, getRectangle, getRegion, getState, getTeam, getVelocity, getVelocityX, getVelocityY, getWidth, intersectRegions, isMovable, isSameState, makeRegions, makeSolid, makeSolidTop, setAcceleration, setAcceleration, setAccelerationX, setAccelerationY, setID, setPictureList, setPosition, setPosition, setPositionX, setPositionY, setRectangle, setSize, setState, setTeam, setVelocity, setVelocity, setVelocityX, setVelocityY, stopHorizontal, stopVertical |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Terrain
public Terrain()
- Default constructor.
Terrain
public Terrain(double x,
double y,
double w,
double h,
PictureList p)
- Constructor.
- Parameters:
x
- The x-position.y
- The y-position.w
- The width.h
- The height.
Terrain
public Terrain(double w,
double h,
PictureList p)
- Constructor, with position defaulted to (0, 0).
- Parameters:
w
- The width.h
- The height.
move
public XYPair move(Environment env)
- Ask the object where it wants to move (which would be, quite simply, nowhere).
- Specified by:
move
in class GameObj
- Parameters:
env
- The environment this object is in.
- Returns:
- Zero velocity, represented as an X-Y coordinate pair.
- See Also:
GameObj