public abstract class AbstractEntity extends AbstractGameObject implements IsSelfAware
GAME_DIAGLENGTH, GAME_DIAGLENGTH2, GAME_EDGELENGTH, OBJECTTYPESNUM, SCREEN_DEPTH, SCREEN_DEPTH2, SCREEN_DEPTH4, SCREEN_HEIGHT, SCREEN_HEIGHT2, SCREEN_HEIGHT4, SCREEN_WIDTH, SCREEN_WIDTH2, SCREEN_WIDTH4, VALUESNUM
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
|
boolean |
existing()
Is the object active on the map?
|
char |
getCategory()
Get the category letter for accessing sprites.
|
int |
getDimensionZ() |
java.lang.String |
getName()
Returns the name of the object
|
Point |
getPosition()
Return the coordinates of the SelfAware object.
|
boolean |
onGround()
Is the entity laying/standing on the ground?
|
void |
render(GameView view,
Camera camera)
renders using it's saved postion
|
void |
setDimensionZ(int dimensionZ)
Set the height of the object.
|
void |
setHeight(float height) |
void |
setPosition(AbstractPosition pos)
Set the coordinates without safety check.
|
boolean |
shouldBeDisposed() |
getDrawCalls, getId, getLightlevel, getPixmap, getRotation, getSprite, getSprites, getSpritesheet, getValue, increaseDrawCalls, isClipped, isHidden, isObstacle, isTransparent, loadSheet, prepareColor, render, render, render, render, render, render, render, resetDrawCalls, setClipped, setHidden, setLightlevel, setObstacle, setRotation, setTransparent, setValue, staticDispose, update, updateStaticUpdates
protected AbstractEntity(int id, Point point)
id
- point
- public Point getPosition()
IsSelfAware
getPosition
in interface IsSelfAware
public void setPosition(AbstractPosition pos)
IsSelfAware
setPosition
in interface IsSelfAware
pos
- the coordinates you want to setpublic void setHeight(float height)
height
- public boolean onGround()
public AbstractEntity exist()
public boolean existing()
public char getCategory()
AbstractGameObject
getCategory
in class AbstractGameObject
public java.lang.String getName()
AbstractGameObject
getName
in class AbstractGameObject
public void setDimensionZ(int dimensionZ)
dimensionZ
- public int getDimensionZ()
public void dispose()
public boolean shouldBeDisposed()