us.asciiroth.client.terrain.decorators
Class PieceCreator
java.lang.Object
us.asciiroth.client.core.AbstractPiece
us.asciiroth.client.terrain.decorators.Decorator
us.asciiroth.client.terrain.decorators.PieceCreator
- All Implemented Interfaces:
- ColorListener, Piece, Terrain, TerrainProxy
public class PieceCreator
- extends Decorator
A utility terrain. When it receives a color event, it creates an item
or agent at the cell it decorates, or at the location of the event,
depending on the configuration. It will create an item regardless of
whether the item is there or not, though it will not overwrite an agent
if it is in that location.
Methods inherited from class us.asciiroth.client.terrain.decorators.Decorator |
canEnter, canExit, getProxiedTerrain, is, not, onAdjacentTo, onAgentEnter, onAgentExit, onColorEvent, onDrop, onEnter, onExit, onFlyOver, onNotAdjacentTo, onPickup |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERIALIZER
public static final Serializer<PieceCreator> SERIALIZER
- Type serializer.
PieceCreator
public PieceCreator(Terrain terrain,
Color color,
Piece piece,
boolean atOrigin)
- Constructor.
- Parameters:
terrain
- color
- piece
- atOrigin
-
onColorEventInternal
public void onColorEventInternal(Context ctx,
Cell cell,
Cell origin)
- Description copied from class:
Decorator
- Override this method in subclasses in order to augment the onTrigger
behavior of the decorated terrain.
proxy
public Terrain proxy(Terrain terrain)
- Returns:
- a new proxy, with the same behavior but wrapping a
different terrain
© 2009 Alx Dark