Class TriggerOnce

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

public class TriggerOnce
extends Trigger

A trigger that will fire a color event on the board one and only one time. When it fires it will also optionally show a message.

There are many ways we could ensure that the trigger fires one time. A flag is set (the trigger's key); this ensures that the trigger will only fire once, even if it occurs on different boards.

Field Summary
static Serializer<TriggerOnce> SERIALIZER
          Type serializer.
Method Summary
 boolean equals(java.lang.Object obj)
 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.
Methods inherited from class us.asciiroth.client.terrain.triggers.Trigger
getMessage, proxy
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
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<TriggerOnce> SERIALIZER
Type serializer.

Method Detail


public boolean equals(java.lang.Object obj)
equals in class java.lang.Object


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.

onEnterInternal in class Trigger


2009 Alx Dark