org.micropsi.comp.world.objects
Class FungusObject

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.FungusObject
All Implemented Interfaces:
EatableIF, VisualFeatureIF, WorldMessageHandlerIF

public class FungusObject
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
FungusObject(org.w3c.dom.Element configData, Logger logger)
          Constructor for FungusObject.
FungusObject(java.lang.String objectName, java.lang.String objectClass, Position pos)
          Constructor for FungusObject.
 
Method Summary
 void _handleMessage(AbstractWorldMessage m)
           
 double getNutrientContent()
           
 double getWaterContent()
           
protected  void initObjectParameters()
           
 void processDrinkAction(AbstractWorldMessage m)
           
 void processEatAction(AbstractWorldMessage m)
           
 void setNutrientContent(double kiloJoules)
          Sets the nutrientContent.
 void setWaterContent(double liters)
          Sets the waterContent.
 
Methods inherited from class org.micropsi.comp.world.objects.AbstractCommonObject
breakToPeaces, handleMessageAgentAction, initProperties, 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
_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

FungusObject

public FungusObject(java.lang.String objectName,
                    java.lang.String objectClass,
                    Position pos)
Constructor for FungusObject.

Parameters:
objectName -

FungusObject

public FungusObject(org.w3c.dom.Element configData,
                    Logger logger)
             throws MicropsiException
Constructor for FungusObject.

Parameters:
configData -
Throws:
MicropsiException
Method Detail

initObjectParameters

protected void initObjectParameters()
Overrides:
initObjectParameters in class AbstractObject

_handleMessage

public void _handleMessage(AbstractWorldMessage m)
Overrides:
_handleMessage in class AbstractObjectPart
Parameters:
m -
See Also:
org.micropsi.comp.world.WorldMessageHandlerIF#handleMessage(org.micropsi.comp.world.messages.WorldMessage)

getWaterContent

public double getWaterContent()
Specified by:
getWaterContent in interface EatableIF
Returns:
int

setWaterContent

public void setWaterContent(double liters)
Sets the waterContent.

Specified by:
setWaterContent in interface EatableIF

getNutrientContent

public double getNutrientContent()
Specified by:
getNutrientContent in interface EatableIF
Returns:
int

setNutrientContent

public void setNutrientContent(double kiloJoules)
Sets the nutrientContent.

Specified by:
setNutrientContent in interface EatableIF

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

.