us.asciiroth.client.terrain.triggers
Class TriggerOnceOnDrop

java.lang.Object
  extended by us.asciiroth.client.core.AbstractPiece
      extended by us.asciiroth.client.terrain.decorators.Decorator
          extended by us.asciiroth.client.terrain.triggers.TriggerOnceOnDrop
All Implemented Interfaces:
ColorListener, Piece, Terrain, TerrainProxy

public class TriggerOnceOnDrop
extends Decorator

Trigger (once) when the specified item is dropped on this cell. As I can't think of any interesting cases for a repeat trigger of this type, I didn't create one (this trigger is used to deliver an item as part of an item quest).


Field Summary
static Serializer<TriggerOnceOnDrop> SERIALIZER
          Type serializer.
 
Constructor Summary
TriggerOnceOnDrop(Terrain terrain, Color color, java.lang.String flag)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 void onDropInternal(Event event, Cell cell, Item item)
          Override this method in subclasses in order to augment the onDrop 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
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface us.asciiroth.client.core.Piece
getColor, getName, getSymbol
 

Field Detail

SERIALIZER

public static final Serializer<TriggerOnceOnDrop> SERIALIZER
Type serializer.

Constructor Detail

TriggerOnceOnDrop

public TriggerOnceOnDrop(Terrain terrain,
                         Color color,
                         java.lang.String flag)
Constructor.

Parameters:
terrain -
color -
flag -
Method Detail

equals

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

onDropInternal

public void onDropInternal(Event event,
                           Cell cell,
                           Item item)
Description copied from class: Decorator
Override this method in subclasses in order to augment the onDrop behavior of the decorated terrain.


proxy

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

0.7

2009 Alx Dark