Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`protected int` | `action`
`protected int` | `actionIn`
`protected int` | `detectingRange`
`protected int` | `displaySize`
`protected int` | `energy`
`protected int` | `initialEnergy`
`protected static int` | `NULL`
`protected int` | `radius`
`protected boolean` | `showDetect`
`protected boolean` | `showEnergyLevel`
`protected int` | `speed`
`protected double` | `x`
`protected int` | `xdisplay`
`protected double` | `y`
`protected int` | `ydisplay`

Fields inherited from class SEdit.SElement
`comment, descriptor, element, id, label, persistent, structure`

Method Summary
`protected void` | `addInArrow(SArrow a)`
`protected void` | `addOutArrow(SArrow a)`
`protected void` | `decreaseEnergyLevel(int value)`
`void` | `delete()`
`protected double` | `distanceFrom(Entity e)` Compute the distance between this entity and another entity e.
`protected boolean` | `dropEntity(Entity e, double direction)`
`int` | `getDetectingRange()`
`int` | `getEnergy()`
`WarbotEnvironment` | `getEnvironmentAgent()`
`java.util.Vector` | `getInArrows()`
`java.lang.String` | `getName()`
`java.util.Vector` | `getOutArrows()`
`int` | `getRadius()`
`boolean` | `getShot()`
`boolean` | `getShowDetect()`
`boolean` | `getShowEnergyLevel()`
`int` | `getSpeed()`
`java.lang.String` | `getTeam()`
`double` | `getX()`
`double` | `getY()`
`protected void` | `increaseEnergyLevel(int value)`
`void` | `init()` Initialization method called at the end of the creation of an element.
`protected boolean` | `isConnectable(SArrow s, boolean isTarget)`
`Percept` | `makePercept(double dx, double dy, double dist)`
`void` | `setDetectingRange(int value)`
`void` | `setEnergy(int value)`
`void` | `setEnvironmentAgent(WarbotEnvironment theEnv)`
`void` | `setName(java.lang.String theName)`
`void` | `setRadius(int value)`
`void` | `setShowDetect(boolean t)`
`void` | `setShowEnergyLevel(boolean t)`
`void` | `setSpeed(int value)` Displays the graphic representation of the body.
`void` | `setTeam(java.lang.String theTeam)`
`void` | `setX(double v)`
`void` | `setY(double v)`
`void` | `toggleShowDetect()`
`void` | `toggleShowEnergyLevel()`
`java.lang.String` | `toString()`

Methods inherited from class SEdit.SNode
`activate, deleteInArrow, deleteOutArrow, initGraphics, reInstall`

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`

Field Detail

### 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

Method Detail

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.