|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object us.asciiroth.client.core.AbstractPiece us.asciiroth.client.terrain.decorators.Decorator us.asciiroth.client.terrain.Cliff
public class Cliff
Creates a cliff-like version of the terrain where the only way to enter or exit is via another cell that contains the same apparent terrain.
Field Summary | |
---|---|
static Serializer<Cliff> |
SERIALIZER
Type serializer. |
Constructor Summary | |
---|---|
Cliff(Terrain terrain)
Constructor. |
Method Summary | |
---|---|
boolean |
canEnter(Agent agent,
Cell cell,
Direction dir)
Can the (non-player) agent enter this terrain? Without regard to side effects, this method should determine if the agent can actually move into the cell. |
boolean |
canExit(Agent agent,
Cell cell,
Direction dir)
Can the (non-player) agent exit this terrain? Without regard to side effects, this method should determine if the agent can actually move into the cell. |
void |
onEnterInternal(Event event,
Player player,
Cell cell,
Direction dir)
Override this method in subclasses in order to augment the onEnter behavior of the decorated terrain. |
void |
onExitInternal(Event event,
Player player,
Cell cell,
Direction dir)
Override this method in subclasses in order to augment the onExit behavior of the decorated terrain. |
Terrain |
proxy(Terrain terrain)
|
Methods inherited from class us.asciiroth.client.terrain.decorators.Decorator |
---|
getProxiedTerrain, is, not, onAdjacentTo, onAgentEnter, onAgentExit, onColorEvent, onDrop, onEnter, onExit, onFlyOver, onNotAdjacentTo, onPickup |
Methods inherited from class us.asciiroth.client.core.AbstractPiece |
---|
getColor, getName, getSymbol |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface us.asciiroth.client.core.Piece |
---|
getColor, getName, getSymbol |
Field Detail |
---|
public static final Serializer<Cliff> SERIALIZER
Constructor Detail |
---|
public Cliff(Terrain terrain)
terrain
- Method Detail |
---|
public boolean canEnter(Agent agent, Cell cell, Direction dir)
Terrain
canEnter
in interface Terrain
canEnter
in class Decorator
Cell.canEnter(Cell, Agent, Direction, boolean)
public boolean canExit(Agent agent, Cell cell, Direction dir)
Terrain
canExit
in interface Terrain
canExit
in class Decorator
Cell.canEnter(Cell, Agent, Direction, boolean)
public void onEnterInternal(Event event, Player player, Cell cell, Direction dir)
Decorator
public void onExitInternal(Event event, Player player, Cell cell, Direction dir)
Decorator
public Terrain proxy(Terrain terrain)
|
0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© 2009 Alx Dark