org.simbrain.world.odorworld
Class AbstractEntity
java.lang.Object
org.simbrain.world.odorworld.AbstractEntity
- Direct Known Subclasses:
- OdorWorldEntity, Wall
public abstract class AbstractEntity
- extends Object
AbstractEntity is an abstract class providing a basic structure for all items in the world.
- Author:
- RJB
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractEntity
public AbstractEntity()
getX
public abstract int getX()
- Returns:
- the x position of the entity
getY
public abstract int getY()
- Returns:
- the y position
setX
public abstract void setX(int x)
- Parameters:
x - the x to set
setY
public abstract void setY(int y)
- Parameters:
y - the y to set
getWidth
public abstract int getWidth()
- Returns:
- the width
getHeight
public abstract int getHeight()
- Returns:
- the height
getEdible
public abstract boolean getEdible()
- Returns:
- the edibility
setEdible
public abstract void setEdible(boolean edible)
- Parameters:
edible - the boolean value for edibility
getBitesToDie
public abstract int getBitesToDie()
- Returns:
- the number of bites to die
getBites
public abstract int getBites()
- Returns:
- the number of bites
setBites
public abstract void setBites(int bites)
- Parameters:
bites - the bites to set
getResurrectionProb
public abstract double getResurrectionProb()
- Returns:
- the probability of resurrection
setResurrectionProb
public abstract void setResurrectionProb(double bites)
- Parameters:
bites - the resurrection prob to set
terminate
public abstract void terminate()
getRectangle
public abstract Rectangle getRectangle()
- Returns a Rectangle describing the location of the Entity (For Calculating Collisions).
- Returns:
- Rectangle that represents the current boundaries of this entity
getRectangle
public abstract Rectangle getRectangle(Point p)
- Parameters:
p - the point around which to build the testing bounds
- Returns:
- the testing bounds
getParent
public abstract OdorWorld getParent()
- Returns:
- the parent OdorWorld
getStimulus
public abstract Stimulus getStimulus()
- Returns:
- the stimulus produced by this entity
setParent
public abstract void setParent(OdorWorld world)
- Parameters:
world - the parent OdorWorld to set
paintThis
public abstract void paintThis(Graphics g)
- Causes the item to paint itself to the world.
- Parameters:
g - is the graphics item for the panel
getLocation
public abstract Point getLocation()
- Returns:
- the location of this entity