|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectItem
Food
public class Food
Field Summary | |
---|---|
private int |
breathAmount
|
private int |
energyValue
|
private boolean |
isEdible
|
private int |
maxEnergyValue
|
static boolean |
WILL_REGROW
|
Constructor Summary | |
---|---|
Food(Vector pos,
Environment env)
|
Method Summary | |
---|---|
void |
action()
|
void |
breathe()
|
int |
energyValue()
|
int |
giveEnergy()
|
boolean |
isEdible()
|
boolean |
isPortable()
|
void |
setEnergyValue(int i)
|
Methods inherited from class Item |
---|
age, classImage, className, color, displacement, displacement, distanceFrom, distanceFrom, environment, image, incrementAge, isActive, isAlive, isPushable, isSolid, message, messageCounter, performSpecificFunction, position, radiusOfContact, reduceMessageCounter, remove, setActive, setAge, setColor, setEnvironment, setImage, setMessage, setPosition, setRadiusOfContact, showMessage, theCloser, toImage, touchingDistance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean WILL_REGROW
private int maxEnergyValue
private int energyValue
private int breathAmount
private boolean isEdible
Constructor Detail |
---|
public Food(Vector pos, Environment env)
Method Detail |
---|
public void action()
action
in class Item
public void breathe()
public int energyValue()
public void setEnergyValue(int i)
public int giveEnergy()
public boolean isPortable()
isPortable
in class Item
public boolean isEdible()
isEdible
in class Item
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |