public abstract class AbstractEntity extends AbstractGameObject implements IsSelfAware
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
NAMELIST
Containts the names of the objects. index=id
|
GAME_DIAGLENGTH, GAME_DIAGLENGTH2, GAME_EDGELENGTH, OBJECTTYPESCOUNT, SCREEN_DEPTH, SCREEN_DEPTH2, SCREEN_DEPTH4, SCREEN_HEIGHT, SCREEN_HEIGHT2, SCREEN_HEIGHT4, SCREEN_WIDTH, SCREEN_WIDTH2, SCREEN_WIDTH4, VALUESCOUNT
Modifier | Constructor and Description |
---|---|
protected |
AbstractEntity(int id,
Point point)
Create an abstractEntity.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Deletes the object from the map.
|
AbstractEntity |
exist()
add this entity to the map-> let it exist
|
char |
getCategory() |
int |
getDepth(AbstractPosition pos)
Returns the depth of the object.
|
java.lang.String |
getName()
Returns the name of the object
|
Point |
getPos()
Return the coordinates of the SelfAware object.
|
boolean |
onGround()
Is the entity laying/standing on the ground?
|
void |
setHeight(float height) |
void |
setPos(AbstractPosition pos)
Set the coordinates without safety check.
|
boolean |
shouldBeDisposed() |
getDimensionZ, getDrawCalls, getId, getLightlevel, getPixmap, getSprite, getSprites, getSpritesheet, getValue, increaseDrawCalls, isClipped, isHidden, isObstacle, isTransparent, loadSheet, prepareColor, render, render, render, render, render, render, render, resetDrawCalls, setClipped, setDimensionZ, setHidden, setLightlevel, setObstacle, setTransparent, setValue, staticDispose, update, updateStaticUpdates
public static final java.lang.String[] NAMELIST
protected AbstractEntity(int id, Point point)
id
- point
- Block.getInstance(int)
public int getDepth(AbstractPosition pos)
AbstractGameObject
getDepth
in class AbstractGameObject
public Point getPos()
IsSelfAware
getPos
in interface IsSelfAware
public final void setPos(AbstractPosition pos)
IsSelfAware
setPos
in interface IsSelfAware
pos
- the coordinates you want to setpublic void setHeight(float height)
height
- public boolean onGround()
public AbstractEntity exist()
public char getCategory()
getCategory
in class AbstractGameObject
public java.lang.String getName()
AbstractGameObject
getName
in class AbstractGameObject
public void dispose()
public boolean shouldBeDisposed()