public class ExplosiveBarrel extends Block implements IsSelfAware
Modifier and Type | Field and Description |
---|---|
static int |
RADIUS
Defines the radius of the explosion.
|
LEFTSIDE, NAMELIST, RIGHTSIDE, TOPSIDE
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
Constructor and Description |
---|
ExplosiveBarrel(int id,
Coordinate coords)
Create a explosive barrel.
|
Modifier and Type | Method and Description |
---|---|
void |
explode()
Explodes the barrel.
|
Coordinate |
getPos()
Return the coordinates of the SelfAware object.
|
void |
setPos(AbstractPosition pos)
Set the coordinates without safety check.
|
createBasicInstance, getBlockSprite, getBlocksprites, getCategory, getDepth, getInstance, getInstance, getInstance, getName, getRepresentingColor, hasSides, isLiquid, render, render, render, render, renderSide, renderSide, renderSide, renderSide, setClipped, setNoSides, setSideClipping, staticDispose, update
getDimensionZ, getDrawCalls, getId, getLightlevel, getPixmap, getSprite, getSprites, getSpritesheet, getValue, increaseDrawCalls, isClipped, isHidden, isObstacle, isTransparent, loadSheet, prepareColor, render, render, render, render, resetDrawCalls, setDimensionZ, setHidden, setLightlevel, setObstacle, setTransparent, setValue, updateStaticUpdates
public static final int RADIUS
public ExplosiveBarrel(int id, Coordinate coords)
id
- the id of the explosive barrelcoords
- The coordinates where this object get's placed.public void explode()
public Coordinate getPos()
IsSelfAware
getPos
in interface IsSelfAware
public void setPos(AbstractPosition pos)
IsSelfAware
setPos
in interface IsSelfAware
pos
- the coordinates you want to set