us.asciiroth.client.terrain
Class Reflector
java.lang.Object
us.asciiroth.client.core.AbstractPiece
us.asciiroth.client.terrain.AbstractTerrain
us.asciiroth.client.terrain.Reflector
- All Implemented Interfaces:
- ColorListener, Piece, Terrain
public class Reflector
- extends AbstractTerrain
- implements ColorListener
A reflector is an abstract puzzle piece that has a "reflector" pointing in a
given direction. When a projectile of some sort is thrown or shot at a reflector,
it will bounce off of it, reflected in another direction depending on the
current orientation of the reflector (this is easier seen than explained).
Further, the flight is extended by another standard throw as if the object had
picked up energy from the reflector.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERIALIZER
public static final Serializer<Reflector> SERIALIZER
Reflector
public Reflector(Direction direction,
Color color)
onColorEvent
public void onColorEvent(Context ctx,
Cell cell,
Cell origin)
- Description copied from interface:
ColorListener
- Terrain has received a color event, probably related to the
firing of a color event on the board. Different terrain behave
differently when triggered, most flip between a set of states.
- Specified by:
onColorEvent
in interface ColorListener
- Parameters:
ctx
- a context object with references to game state
onEnter
public void onEnter(Event event,
Player player,
Cell cell,
Direction dir)
- Description copied from interface:
Terrain
- Agent attempting to leave the
from
cell, heading
toward the to
cell. The terrain being used is the
terrain of the to
cell. The agent is still in the
from
- Specified by:
onEnter
in interface Terrain
- Overrides:
onEnter
in class AbstractTerrain
onFlyOver
public void onFlyOver(Event event,
Cell cell,
InFlightItem flier)
- Description copied from interface:
Terrain
- Terrain has an item flying over it. If the event is canceled
at this point, the item will fall to the ground on this cell.
- Specified by:
onFlyOver
in interface Terrain
- Overrides:
onFlyOver
in class AbstractTerrain
© 2009 Alx Dark