us.asciiroth.client.terrain
Class Raft
java.lang.Object
us.asciiroth.client.core.AbstractPiece
us.asciiroth.client.terrain.AbstractTerrain
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.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERIALIZER
public static final Serializer<Raft> SERIALIZER
- Type serializer.
onAgentExit
public void onAgentExit(Event event,
Agent agent,
Cell cell,
Direction dir)
- Specified by:
onAgentExit
in interface Terrain
- Overrides:
onAgentExit
in class AbstractTerrain
onExit
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
- Overrides:
onExit
in class AbstractTerrain
© 2009 Alx Dark