Class Raft

  extended by us.asciiroth.client.core.AbstractPiece
      extended by us.asciiroth.client.terrain.AbstractTerrain
          extended by us.asciiroth.client.terrain.Raft
All Implemented Interfaces:
Piece, Terrain

public class Raft
extends AbstractTerrain

A raft. When an agent moves onto a raft (the player or any other agent), they can use it to move over water or ocean. They can only leave it when it touches a non-water terrain they can enter. However, it's not capable of figuring out areas where there is both water and ocean pieces, it will mix these up (though the player is unlikely to notice); generally on a map you'd have either ocean or water, and they wouldn't be mixed together, but nothing enforces this.

Field Summary
static Serializer<Raft> SERIALIZER
          Type serializer.
Method Summary
 void onAgentExit(Event event, Agent agent, Cell cell, Direction dir)
 void onExit(Event event, Player player, Cell cell, Direction dir)
          Agent attempting to exit the from cell, heading toward the to cell.
Methods inherited from class us.asciiroth.client.terrain.AbstractTerrain
canEnter, canExit, onAdjacentTo, onAgentEnter, onDrop, onEnter, onFlyOver, onNotAdjacentTo, onPickup
Methods inherited from class us.asciiroth.client.core.AbstractPiece
getColor, getName, getSymbol, is, not
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, is, not

Field Detail


public static final Serializer<Raft> SERIALIZER
Type serializer.

Method Detail


public void onAgentExit(Event event,
                        Agent agent,
                        Cell cell,
                        Direction dir)
Specified by:
onAgentExit in interface Terrain
onAgentExit in class AbstractTerrain


public void onExit(Event event,
                   Player player,
                   Cell cell,
                   Direction dir)
Description copied from interface: Terrain
Agent attempting to exit the 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

Specified by:
onExit in interface Terrain
onExit in class AbstractTerrain


2009 Alx Dark