public abstract class Human extends StandardEntity
Modifier | Constructor and Description |
---|---|
protected |
Human(EntityID id)
Construct a Human object with entirely undefined property values.
|
|
Human(Human other)
Human copy constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getBuriedness()
Get the buriedness of this human.
|
IntProperty |
getBuriednessProperty()
Get the buriedness property.
|
int |
getDamage()
Get the damage of this human.
|
IntProperty |
getDamageProperty()
Get the damage property.
|
int |
getDirection()
Get the direction.
|
IntProperty |
getDirectionProperty()
Get the direction property.
|
int |
getHP()
Get the hp of this human.
|
IntProperty |
getHPProperty()
Get the hp property.
|
Pair<java.lang.Integer,java.lang.Integer> |
getLocation(WorldModel<? extends StandardEntity> world)
Get the location of this entity.
|
EntityID |
getPosition()
Get the position of this human.
|
StandardEntity |
getPosition(WorldModel<? extends StandardEntity> model)
Get the entity represented by the position property.
|
int[] |
getPositionHistory()
Get the position history.
|
IntArrayProperty |
getPositionHistoryProperty()
Get the position history property.
|
EntityRefProperty |
getPositionProperty()
Get the position property.
|
Property |
getProperty(java.lang.String urn)
Get a property by urn.
|
int |
getStamina()
Get the stamina of this human.
|
IntProperty |
getStaminaProperty()
Get the stamina property.
|
int |
getTravelDistance()
Get the travel distance.
|
IntProperty |
getTravelDistanceProperty()
Get the travel distance property.
|
int |
getX()
Get the X coordinate of this human.
|
IntProperty |
getXProperty()
Get the X property.
|
int |
getY()
Get the y coordinate of this human.
|
IntProperty |
getYProperty()
Get the y property.
|
boolean |
isBuriednessDefined()
Find out if the buriedness property has been defined.
|
boolean |
isDamageDefined()
Find out if the damage property has been defined.
|
boolean |
isDirectionDefined()
Find out if the direction property has been defined.
|
boolean |
isHPDefined()
Find out if the hp property has been defined.
|
boolean |
isPositionDefined()
Find out if the position property has been defined.
|
boolean |
isPositionHistoryDefined()
Find out if the position history property has been defined.
|
boolean |
isStaminaDefined()
Find out if the stamina property has been defined.
|
boolean |
isTravelDistanceDefined()
Find out if the travel distance property has been defined.
|
boolean |
isXDefined()
Find out if the x property has been defined.
|
boolean |
isYDefined()
Find out if the y property has been defined.
|
void |
setBuriedness(int buriedness)
Set the buriedness of this human.
|
void |
setDamage(int damage)
Set the damage of this human.
|
void |
setDirection(int direction)
Set the direction.
|
void |
setHP(int newHP)
Set the hp of this human.
|
void |
setPosition(EntityID position)
Set the position of this human.
|
void |
setPosition(EntityID newPosition,
int newX,
int newY)
Set the position of this human.
|
void |
setPositionHistory(int[] history)
Set the position history.
|
void |
setStamina(int stamina)
Set the stamina of this human.
|
void |
setTravelDistance(int d)
Set the travel distance.
|
void |
setX(int x)
Set the X coordinate of this human.
|
void |
setY(int y)
Set the y coordinate of this human.
|
void |
undefineBuriedness()
Undefine the buriedness property.
|
void |
undefineDamage()
Undefine the damage property.
|
void |
undefineDirection()
Undefine the direction property.
|
void |
undefineHP()
Undefine the hp property.
|
void |
undefinePosition()
Undefine the position property.
|
void |
undefinePositionHistory()
Undefine the position history property.
|
void |
undefineStamina()
Undefine the stamina property.
|
void |
undefineTravelDistance()
Undefine the travel distance property.
|
void |
undefineX()
Undefine the X property.
|
void |
undefineY()
Undefine the y property.
|
getStandardURN, getURN
addEntityListener, copy, copyImpl, equals, firePropertyChanged, getEntityName, getFullDescription, getID, getProperties, hashCode, read, registerProperties, removeEntityListener, toString, write
protected Human(EntityID id)
id
- The ID of this entity.public Human(Human other)
other
- The Human to copy.public Property getProperty(java.lang.String urn)
Entity
getProperty
in interface Entity
getProperty
in class AbstractEntity
urn
- The urn to look up.public Pair<java.lang.Integer,java.lang.Integer> getLocation(WorldModel<? extends StandardEntity> world)
StandardEntity
getLocation
in class StandardEntity
world
- The world model to look up for entity references.public EntityRefProperty getPositionProperty()
public EntityID getPosition()
public void setPosition(EntityID position)
position
- The new position.public boolean isPositionDefined()
public void undefinePosition()
public IntArrayProperty getPositionHistoryProperty()
public int[] getPositionHistory()
public void setPositionHistory(int[] history)
history
- The new position history.public boolean isPositionHistoryDefined()
public void undefinePositionHistory()
public IntProperty getDirectionProperty()
public int getDirection()
public void setDirection(int direction)
direction
- The new direction.public boolean isDirectionDefined()
public void undefineDirection()
public IntProperty getStaminaProperty()
public int getStamina()
public void setStamina(int stamina)
stamina
- The new stamina.public boolean isStaminaDefined()
public void undefineStamina()
public IntProperty getHPProperty()
public int getHP()
public void setHP(int newHP)
newHP
- The new hp.public boolean isHPDefined()
public void undefineHP()
public IntProperty getDamageProperty()
public int getDamage()
public void setDamage(int damage)
damage
- The new damage.public boolean isDamageDefined()
public void undefineDamage()
public IntProperty getBuriednessProperty()
public int getBuriedness()
public void setBuriedness(int buriedness)
buriedness
- The new buriedness.public boolean isBuriednessDefined()
public void undefineBuriedness()
public IntProperty getXProperty()
public int getX()
public void setX(int x)
x
- The new x coordinate.public boolean isXDefined()
public void undefineX()
public IntProperty getYProperty()
public int getY()
public void setY(int y)
y
- The new y coordinate.public boolean isYDefined()
public void undefineY()
public IntProperty getTravelDistanceProperty()
public int getTravelDistance()
public void setTravelDistance(int d)
d
- The new travel distance.public boolean isTravelDistanceDefined()
public void undefineTravelDistance()
public StandardEntity getPosition(WorldModel<? extends StandardEntity> model)
model
- The WorldModel to look up entity references.public void setPosition(EntityID newPosition, int newX, int newY)
newPosition
- The new position.newX
- The x coordinate of this agent.newY
- The y coordinate if this agent.