us.asciiroth.client.terrain.decorators
Class AgentDestroyer
java.lang.Object
us.asciiroth.client.core.AbstractPiece
us.asciiroth.client.terrain.decorators.Decorator
us.asciiroth.client.terrain.decorators.AgentDestroyer
- All Implemented Interfaces:
- ColorListener, Piece, Terrain, TerrainProxy
public class AgentDestroyer
- extends Decorator
When this decorator receives a color event, it destroys the agent at
the given location, if there is one. If the color is specified as
NONE, than any agent (besides the player) that enters this terrain
will disappear. This is useful if paired with an AgentCreator
that is feeding something like rolling boulders or pushers onto the
board.
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<AgentDestroyer> SERIALIZER
- Type serializer.
AgentDestroyer
public AgentDestroyer(Terrain terrain,
Color color)
- Constructor.
- Parameters:
terrain
- color
- color to trigger agent destruction, or none if any
agent that enters cell should be removed from the
board (except the player)
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