org.micropsi.comp.world.objects
Class PeppermintObject

java.lang.Object
  extended byorg.micropsi.comp.world.objects.AbstractObjectPart
      extended byorg.micropsi.comp.world.objects.AbstractObject
          extended byorg.micropsi.comp.world.objects.AbstractCommonObject
              extended byorg.micropsi.comp.world.objects.PeppermintObject
All Implemented Interfaces:
EatableIF, VisualFeatureIF, WorldMessageHandlerIF

public class PeppermintObject
extends AbstractCommonObject
implements EatableIF


Field Summary
 
Fields inherited from class org.micropsi.comp.world.objects.AbstractCommonObject
damage, maxDamage
 
Fields inherited from class org.micropsi.comp.world.objects.AbstractObject
lastChange, moveVector, objectName, persistent, state, weight
 
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.
 
Method Summary
 int getHealingPoints()
           
 double getNutrientContent()
           
 double getWaterContent()
           
protected  void initObjectParameters()
           
protected  void initProperties()
           
 void processDrinkAction(AbstractWorldMessage m)
           
 void processEatAction(AbstractWorldMessage m)
           
 void setHealingPoints(int healingPoints)
          Sets the poisionDamage.
 void setNutrientContent(double kiloJoules)
          Sets the kiloJoules.
 void setWaterContent(double liters)
          Sets the liters.
 
Methods inherited from class org.micropsi.comp.world.objects.AbstractCommonObject
breakToPeaces, handleMessageAgentAction, setDamage, setMaxDamage, takeDamage
 
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
 

Constructor Detail

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
Method Detail

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

(c) by Micropsi Project: http://www.cognitive-agents.org

.