|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJTP.Tile
JTP.StartableTile
public class StartableTile
Serves as a parent for all startable tiles. Most methods described here are overloaded.
Field Summary | |
---|---|
protected boolean |
levelStart
Indicates whether this is a start or not |
Fields inherited from class JTP.Tile |
---|
ARROW, GRAVITY, height, ICE, NORMAL, TELEPORT, type |
Constructor Summary | |
---|---|
StartableTile()
|
Method Summary | |
---|---|
boolean |
decHeight()
Reduces height of pile by one. |
boolean |
isStart()
Sepcifies whether this is a start tile. |
boolean |
isStartable()
Specifies whether this can be a start tile. |
void |
setHeight(int height)
Sets height of tile. |
void |
setStart(boolean isStart)
Set whether this tile is a start or not. |
protected void |
tileCheck()
Used to check for tile attribute validity upon creation. |
protected void |
transferAttributesFrom(StartableTile tile)
Used to apply all attributes to this tile from another one. |
protected void |
transferAttributesFrom(Tile tile)
Used to apply all attributes to this tile from another one. |
Methods inherited from class JTP.Tile |
---|
copy, equalsApartFromHeight, getHeight, getType, incHeight |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean levelStart
Constructor Detail |
---|
public StartableTile()
Method Detail |
---|
protected void tileCheck() throws TileException
tileCheck
in class Tile
TileException
- if one or more attributes are invalid for a
particular tile type.protected void transferAttributesFrom(Tile tile)
transferAttributesFrom
in class Tile
tile
- the Tile
instance from which to get attributes.protected void transferAttributesFrom(StartableTile tile)
tile
- the Tile
instance from which to get attributes.public boolean isStart()
true
if this is a start.public boolean isStartable()
ICE
).
isStartable
in class Tile
true
if this can be a start tile.public void setStart(boolean isStart) throws TileException
isStart
- used to toggle start status of this tile.
TileException
- if the height of this tile (zero) does not permit it
to be changed from a start to a non-start tile.public boolean decHeight()
decHeight
in class Tile
true
if the height was reduced.public void setHeight(int height)
setHeight
in class Tile
height
- to which to set this pile to. Note: If a height below 0 is
specified the height will still be set to 0. If the tile is not a start
then the height will be set to at least 1.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |