us.asciiroth.client.terrain
Class OpeningMarker
java.lang.Object
us.asciiroth.client.core.AbstractPiece
us.asciiroth.client.terrain.AbstractTerrain
us.asciiroth.client.terrain.OpeningMarker
- All Implemented Interfaces:
- Piece, Terrain
- Direct Known Subclasses:
- Boards, EmptyChest, Rubble
public abstract class OpeningMarker
- extends AbstractTerrain
Constructor Summary |
OpeningMarker(java.lang.String name,
java.lang.String entity)
|
OpeningMarker(java.lang.String name,
java.lang.String entity,
java.lang.String fancy)
|
Method Summary |
boolean |
canEnter(Agent agent,
Cell cell,
Direction direction)
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. |
void |
onAgentEnter(Event event,
Agent agent,
Cell cell,
Direction dir)
|
void |
onEnter(Event event,
Player player,
Cell cell,
Direction dir)
Agent attempting to leave the from cell, heading
toward the to cell. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OpeningMarker
public OpeningMarker(java.lang.String name,
java.lang.String entity)
OpeningMarker
public OpeningMarker(java.lang.String name,
java.lang.String entity,
java.lang.String fancy)
canEnter
public boolean canEnter(Agent agent,
Cell cell,
Direction direction)
- Description copied from interface:
Terrain
- 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. Error on the side of caution and return false if the answer
is ambiguous.
- Specified by:
canEnter
in interface Terrain
- Overrides:
canEnter
in class AbstractTerrain
- Returns:
- true if the agent can enter the terrain moving between the
two cells using the indicated direction
- See Also:
Cell.canEnter(Cell, Agent, Direction, boolean)
onAgentEnter
public void onAgentEnter(Event event,
Agent agent,
Cell cell,
Direction dir)
- Specified by:
onAgentEnter
in interface Terrain
- Overrides:
onAgentEnter
in class AbstractTerrain
onEnter
public void onEnter(Event event,
Player player,
Cell cell,
Direction dir)
- Description copied from interface:
Terrain
- Agent attempting to leave the
from
cell, heading
toward the to
cell. The terrain being used is the
terrain of the to
cell. The agent is still in the
from
- Specified by:
onEnter
in interface Terrain
- Overrides:
onEnter
in class AbstractTerrain
© 2009 Alx Dark