warbot.kernel
Class Entity
java.lang.Object
SEdit.SElement
SEdit.SNode
warbot.kernel.Entity
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- Hamburger, MovableEntity, Palmtree, Wall
public abstract class Entity
- extends SNode
- implements java.io.Serializable
- See Also:
- Serialized Form
Methods inherited from class SEdit.SElement |
dump, getComment, getDescriptor, getGObject, getID, getLabel, getStructure, inspect, setComment, setDescriptor, setGObject, setID, setLabel, setStructure |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NULL
protected static final int NULL
- See Also:
- Constant Field Values
actionIn
protected int actionIn
speed
protected int speed
action
protected int action
x
protected double x
y
protected double y
xdisplay
protected int xdisplay
ydisplay
protected int ydisplay
displaySize
protected int displaySize
detectingRange
protected int detectingRange
energy
protected int energy
initialEnergy
protected int initialEnergy
radius
protected int radius
showDetect
protected boolean showDetect
showEnergyLevel
protected boolean showEnergyLevel
getInArrows
public java.util.Vector getInArrows()
- Specified by:
getInArrows
in class SNode
getOutArrows
public java.util.Vector getOutArrows()
- Specified by:
getOutArrows
in class SNode
addOutArrow
protected void addOutArrow(SArrow a)
- Specified by:
addOutArrow
in class SNode
addInArrow
protected void addInArrow(SArrow a)
- Specified by:
addInArrow
in class SNode
isConnectable
protected boolean isConnectable(SArrow s,
boolean isTarget)
- Specified by:
isConnectable
in class SNode
makePercept
public Percept makePercept(double dx,
double dy,
double dist)
getX
public final double getX()
setX
public final void setX(double v)
getY
public final double getY()
setY
public final void setY(double v)
setRadius
public void setRadius(int value)
setDetectingRange
public final void setDetectingRange(int value)
getDetectingRange
public final int getDetectingRange()
setEnvironmentAgent
public final void setEnvironmentAgent(WarbotEnvironment theEnv)
getEnvironmentAgent
public final WarbotEnvironment getEnvironmentAgent()
setEnergy
public final void setEnergy(int value)
getTeam
public final java.lang.String getTeam()
setTeam
public final void setTeam(java.lang.String theTeam)
getName
public final java.lang.String getName()
setName
public final void setName(java.lang.String theName)
setShowDetect
public final void setShowDetect(boolean t)
getShowDetect
public final boolean getShowDetect()
toggleShowDetect
public void toggleShowDetect()
setShowEnergyLevel
public final void setShowEnergyLevel(boolean t)
getShowEnergyLevel
public final boolean getShowEnergyLevel()
toggleShowEnergyLevel
public void toggleShowEnergyLevel()
init
public void init()
- Description copied from class:
SElement
- Initialization method called at the end of the creation
of an element. By default do nothing
- Overrides:
init
in class SElement
setSpeed
public final void setSpeed(int value)
- Displays the graphic representation of the body.
getSpeed
public final int getSpeed()
getShot
public final boolean getShot()
getRadius
public int getRadius()
getEnergy
public final int getEnergy()
delete
public void delete()
- Overrides:
delete
in class SNode
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
dropEntity
protected boolean dropEntity(Entity e,
double direction)
distanceFrom
protected final double distanceFrom(Entity e)
- Compute the distance between this entity and another entity e.
A distance of 0 means that the two entities touch each other
- Parameters:
e
- : the entity
- Returns:
decreaseEnergyLevel
protected final void decreaseEnergyLevel(int value)
increaseEnergyLevel
protected void increaseEnergyLevel(int value)
Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.