org.micropsi.comp.world.objects
Class PeppermintObject
java.lang.Object
org.micropsi.comp.world.objects.AbstractObjectPart
org.micropsi.comp.world.objects.AbstractObject
org.micropsi.comp.world.objects.AbstractCommonObject
org.micropsi.comp.world.objects.PeppermintObject
- All Implemented Interfaces:
- EatableIF, VisualFeatureIF, WorldMessageHandlerIF
- public class PeppermintObject
- extends AbstractCommonObject
- implements EatableIF
| Fields inherited from class org.micropsi.comp.world.objects.AbstractObjectPart |
containingPart, id, objectClass, optionalProperties, orientationAngle, partHierarchyLevel, position, requiredProperties, sizeNumberFormat, subParts, world, xSize, ySize, zSize |
|
Constructor Summary |
PeppermintObject(org.w3c.dom.Element configData,
Logger logger)
Constructor for Peppermint. |
PeppermintObject(java.lang.String objectName,
java.lang.String objectClass,
Position pos)
Constructor for Peppermint. |
| Methods inherited from class org.micropsi.comp.world.objects.AbstractObject |
_remove, defaultState, getLastChange, getMoveVector, getObjectIdentification, getObjectName, getState, getState, getWeight, init, initObjectState, isPersistent, logChange, rotateBy, scaleBy, setMoveVector, setObjectName, setPosition, setSize, setState, setWeight, toMTreeNode, toString, toXMLElement, toXMLElement |
| Methods inherited from class org.micropsi.comp.world.objects.AbstractObjectPart |
_handleMessage, _setSize, addLowLevePartsTo, addOptionalProperty, addRequiredProperty, addSubPart, addSubPartRelative, addSubPartsToMTreeNode, createPropertyCollection, getContainingObject, getContainingPart, getDistinctSizes, getId, getLogger, getNextObjectId, getObjectClass, getOptionalProperties, getOrientationAngle, getPartHierarchyLevel, getPosition, getProperties, getSize, getXSize, getYSize, getZSize, handleMessage, hasSubParts, initSubobjects, isAlive, isHighLevelObject, isLowLevelPart, moveBy, moveTo, originatorsMatchSubParts, originatorsMatchSubParts, removeSubPart, rotateToAngle, scaleBy, scaleSubpartsBy, setContainingPart, setDistinctSizes, setObjectClass, setPartHierarchyLevel, setProperties, setProperty, setRequiredProperties, setSize, triggerSubPartChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PeppermintObject
public PeppermintObject(java.lang.String objectName,
java.lang.String objectClass,
Position pos)
- Constructor for Peppermint.
- Parameters:
objectName -
PeppermintObject
public PeppermintObject(org.w3c.dom.Element configData,
Logger logger)
throws MicropsiException
- Constructor for Peppermint.
- Parameters:
configData -
- Throws:
MicropsiException
initProperties
protected void initProperties()
- Overrides:
initProperties in class AbstractCommonObject
initObjectParameters
protected void initObjectParameters()
- Overrides:
initObjectParameters in class AbstractObject
getWaterContent
public double getWaterContent()
- Specified by:
getWaterContent in interface EatableIF
- Returns:
- int
setWaterContent
public void setWaterContent(double liters)
- Sets the liters.
- Specified by:
setWaterContent in interface EatableIF
- Parameters:
liters - The liters to set
getNutrientContent
public double getNutrientContent()
- Specified by:
getNutrientContent in interface EatableIF
- Returns:
- int
setNutrientContent
public void setNutrientContent(double kiloJoules)
- Sets the kiloJoules.
- Specified by:
setNutrientContent in interface EatableIF
- Parameters:
kiloJoules - The kiloJoules to set
getHealingPoints
public int getHealingPoints()
- Returns:
- int
setHealingPoints
public void setHealingPoints(int healingPoints)
- Sets the poisionDamage.
processEatAction
public void processEatAction(AbstractWorldMessage m)
- Specified by:
processEatAction in interface EatableIF
processDrinkAction
public void processDrinkAction(AbstractWorldMessage m)
- Specified by:
processDrinkAction in interface EatableIF
.