|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Terrain
Terrain is a piece type that describes the behavior and appearance of a cell on the board. There is only one terrain piece per cell, although some terrain types nest other terrain pieces (actually this nesting can go several levels deep). Items and agents can be placed on terrain, and must move through terrain.
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. |
boolean |
canExit(Agent agent,
Cell cell,
Direction direction)
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 |
onAdjacentTo(Context context,
Cell cell)
This terrain is adjacent to the player. |
void |
onAgentEnter(Event event,
Agent agent,
Cell cell,
Direction dir)
|
void |
onAgentExit(Event event,
Agent agent,
Cell cell,
Direction dir)
|
void |
onDrop(Event event,
Cell itemLoc,
Item item)
Item is going to drop onto the terrain at this point. |
void |
onEnter(Event event,
Player player,
Cell cell,
Direction dir)
Agent attempting to leave the from cell, heading
toward the to cell. |
void |
onExit(Event event,
Player player,
Cell cell,
Direction dir)
Agent attempting to exit the from cell, heading
toward the to cell. |
void |
onFlyOver(Event event,
Cell cell,
InFlightItem flier)
Terrain has an item flying over it. |
void |
onNotAdjacentTo(Context context,
Cell cell)
This terrain is no longer adjacent to the player. |
void |
onPickup(Event event,
Cell loc,
Agent agent,
Item item)
Item is going to be picked up. |
Methods inherited from interface us.asciiroth.client.core.Piece |
---|
getColor, getName, getSymbol, is, not |
Method Detail |
---|
boolean canEnter(Agent agent, Cell cell, Direction direction)
agent
- cell
- direction
-
Cell.canEnter(Cell, Agent, Direction, boolean)
boolean canExit(Agent agent, Cell cell, Direction direction)
agent
- cell
- direction
-
Cell.canEnter(Cell, Agent, Direction, boolean)
void onAdjacentTo(Context context, Cell cell)
context
- cell
- void onAgentEnter(Event event, Agent agent, Cell cell, Direction dir)
void onAgentExit(Event event, Agent agent, Cell cell, Direction dir)
void onDrop(Event event, Cell itemLoc, Item item)
event
- itemLoc
- item
- void onEnter(Event event, Player player, Cell cell, Direction dir)
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
- Parameters:
event
- player
- cell
- dir
-
void onExit(Event event, Player player, Cell cell, Direction dir)
from
cell, heading
toward the to
cell. The terrain being used is the
from
cell terrain, and the agent is still in the from
cell. If the event is canceled at this point, the agent will not be able
leave this cell. The move will be canceled. This event is fired for the
player as well as all other agents
event
- player
- cell
- dir
- void onFlyOver(Event event, Cell cell, InFlightItem flier)
event
- cell
- flier
- void onNotAdjacentTo(Context context, Cell cell)
context
- cell
- void onPickup(Event event, Cell loc, Agent agent, Item item)
event
- loc
- agent
- item
-
|
0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© 2009 Alx Dark