|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgroup1.model.gameobject.GameObj
group1.model.gameobject.item.Item
public abstract class Item
An abstract "pickup" item. This should have some particular effect on Jeff when he touches it. Such effects in traditional games include: restoring health, obtaining a weapon, transformations, etc. Items may also have detrimental effects, such as poison, damage, bad transformations (such as shrinking), or instant death. (It is suggested that any item disappear once it is touched. This prevents it from being picked up multiple times.)
| Field Summary |
|---|
| Fields inherited from class group1.model.gameobject.GameObj |
|---|
acceleration, ENEMY_TEAM, GRID_SPACE_SIZE, id, isMovable, JEFF_TEAM, myState, NO_TEAM, regions, shape, THICKNESS, velocity |
| Constructor Summary | |
|---|---|
Item(double x,
double y,
double w,
double h,
PictureList p)
Constructor. |
|
| Method Summary | |
|---|---|
void |
itemEffect(Jeff jeff)
The effect of this item on Jeff. |
protected void |
makeItemRegions()
Make the regions for an item. |
XYPair |
move(Environment env)
Standard move function. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Item(double x,
double y,
double w,
double h,
PictureList p)
x - The x-position.y - The y-position.w - The width.h - The height.p - The picture list.| Method Detail |
|---|
public XYPair move(Environment env)
move in class GameObjenv - The environment.
public void itemEffect(Jeff jeff)
jeff - The Jeff object.protected void makeItemRegions()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||