public class ExplosiveBarrel extends Block implements IsSelfAware
GAME_DIAGLENGTH, GAME_DIAGLENGTH2, GAME_EDGELENGTH, GAME_EDGELENGTH2, OBJECTTYPESNUM, SCREEN_DEPTH, SCREEN_DEPTH2, SCREEN_DEPTH4, SCREEN_HEIGHT, SCREEN_HEIGHT2, SCREEN_HEIGHT4, SCREEN_WIDTH, SCREEN_WIDTH2, SCREEN_WIDTH4, VALUESNUM
Constructor and Description |
---|
ExplosiveBarrel(int id)
Create a explosive barrel.
|
Modifier and Type | Method and Description |
---|---|
void |
explode()
Explodes the barrel.
|
Coordinate |
getPosition()
Return the coordinates of the SelfAware object.
|
void |
setPosition(AbstractPosition pos)
Set the coordinates without safety check.
|
Block |
spawn(Coordinate coord)
places the object on the map.
|
createBasicInstance, getBlockSprite, getBlocksprites, getCategory, getInstance, getInstance, getName, getRepresentingColor, hasSides, isLiquid, onDestroy, render, render, render, render, renderSide, renderSide, renderSide, renderSide, setNoSides, staticDispose, update
getDrawCalls, getHealth, getId, getLightlevel, getPixmap, getRotation, getSprite, getSpriteId, getSprites, getSpritesheet, getValue, increaseDrawCalls, isHidden, isObstacle, isTransparent, loadSheet, render, render, render, render, resetDrawCalls, setGraphicsId, setHealth, setHidden, setLightlevel, setObstacle, setRotation, setTransparent, setValue, updateStaticUpdates
public ExplosiveBarrel(int id)
id
- the id of the explosive barrelpublic void explode()
public Coordinate getPosition()
IsSelfAware
getPosition
in interface IsSelfAware
public void setPosition(AbstractPosition pos)
IsSelfAware
setPosition
in interface IsSelfAware
pos
- the coordinates you want to setpublic Block spawn(Coordinate coord)
Block
IsSelfAware
.