us.asciiroth.client.terrain.triggers
Class Trigger
java.lang.Object
us.asciiroth.client.core.AbstractPiece
us.asciiroth.client.terrain.decorators.Decorator
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.
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<Trigger> SERIALIZER
- Type serializer.
getMessage
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.
- Returns:
- A message to display inline or, if the string ends in ".html",
the url to an HTML file to display in a modal dialog.
onEnterInternal
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.
proxy
public Terrain proxy(Terrain terrain)
- Returns:
- a new proxy, with the same behavior but wrapping a
different terrain
© 2009 Alx Dark