Class EntityCollectAction
- java.lang.Object
-
- de.unistuttgart.informatik.fius.icge.simulation.actions.Action
-
- de.unistuttgart.informatik.fius.icge.simulation.actions.EntityAction
-
- de.unistuttgart.informatik.fius.icge.simulation.actions.EntityCollectAction
-
public class EntityCollectAction extends EntityAction
An entity action for when an entity collects another entity.- Author:
- Tim Neumann
-
-
Constructor Summary
Constructors Constructor Description EntityCollectAction(long tickNumber, Entity entity, CollectableEntity collected, Position collectorPos, Position collectedPos)
Create an entity collect action.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectableEntity
getCollectedEntity()
Position
getCollectedEntityPosition()
Position
getCollectorPosition()
String
getDescription()
-
Methods inherited from class de.unistuttgart.informatik.fius.icge.simulation.actions.EntityAction
getEntity
-
Methods inherited from class de.unistuttgart.informatik.fius.icge.simulation.actions.Action
getTickNumber, toString
-
-
-
-
Constructor Detail
-
EntityCollectAction
public EntityCollectAction(long tickNumber, Entity entity, CollectableEntity collected, Position collectorPos, Position collectedPos)
Create an entity collect action.- Parameters:
tickNumber
- the tick the action happened atentity
- the entity that caused the actioncollected
- the entity that was collectedcollectorPos
- the position the collector was at while collectingcollectedPos
- the position the collected entity was at while being collected
-
-
Method Detail
-
getCollectedEntity
public CollectableEntity getCollectedEntity()
- Returns:
- the entity that was collected
-
getCollectedEntityPosition
public Position getCollectedEntityPosition()
- Returns:
- the position the collected entity was at while being collected
-
getCollectorPosition
public Position getCollectorPosition()
- Returns:
- the position the collector was at while collecting
-
getDescription
public String getDescription()
- Specified by:
getDescription
in classAction
- Returns:
- the description of this action
-
-