- All Implemented Interfaces:
- ColorListener, Piece, Terrain, TerrainProxy
public class ColorRelay
- extends Decorator
A terrain that looks like the terrain it decorates, and is for all
purposes the terrain it looks like, but when it receives a color event,
it triggers an event of a different color.
Why is this useful? Let's say you want to have six doors that all
open with one key using a key switch. The problem is that the key can
only open one door, which will consume it. With a color relay,
an orange key switch can trigger an orange color event, and the relay
can convert this to another color, let's say a blue color event. Now
an orange key can open six blue doors via the orange key switch.
|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
public static final Serializer<ColorRelay> SERIALIZER
- Type serializer.
public void onColorEventInternal(Context ctx,
- Description copied from class:
- Override this method in subclasses in order to augment the onTrigger
behavior of the decorated terrain.
public Terrain proxy(Terrain terrain)
- a new proxy, with the same behavior but wrapping a
© 2009 Alx Dark