Class Trigger

  extended by us.asciiroth.client.core.AbstractPiece
      extended by us.asciiroth.client.terrain.decorators.Decorator
          extended by us.asciiroth.client.terrain.triggers.Trigger
All Implemented Interfaces:
ColorListener, Piece, Terrain, TerrainProxy
Direct Known Subclasses:
TriggerIf, TriggerIfNot, TriggerOnce

public class Trigger
extends Decorator

Triggers a color event when entered without any conditions. In this sense, not a lot different than a switch, but invisible. Subclasses of trigger are generally more useful.

Field Summary
static Serializer<Trigger> SERIALIZER
          Type serializer.
Method Summary
 java.lang.String getMessage()
          Get the message or URL for this trigger.
 void onEnterInternal(Event event, Player player, Cell cell, Direction dir)
          Override this method in subclasses in order to augment the onEnter behavior of the decorated terrain.
 Terrain proxy(Terrain terrain)
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 us.asciiroth.client.core.AbstractPiece
getColor, getName, getSymbol
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

Field Detail


public static final Serializer<Trigger> SERIALIZER
Type serializer.

Method Detail


public java.lang.String getMessage()
Get the message or URL for this trigger. Can either be the text itself (will be displayed inline) or an URL to an HTML file that will be displayed in a modal dialog.

A message to display inline or, if the string ends in ".html", the url to an HTML file to display in a modal dialog.


public void onEnterInternal(Event event,
                            Player player,
                            Cell cell,
                            Direction dir)
Description copied from class: Decorator
Override this method in subclasses in order to augment the onEnter behavior of the decorated terrain.


public Terrain proxy(Terrain terrain)
a new proxy, with the same behavior but wrapping a different terrain


2009 Alx Dark