|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object us.asciiroth.client.core.AbstractPiece us.asciiroth.client.terrain.AbstractTerrain us.asciiroth.client.terrain.ForceField
public class ForceField
A force field will not allow the player to pass through it while keeping any items in his or her inventory. They are all dropped on the cell from which the player entered. The purpose of the piece is simply to allow for sub-regions of the board where existing inventory doesn't apply, to arrange a certain puzzle for example.
Field Summary | |
---|---|
static Serializer<ForceField> |
SERIALIZER
Type serializer. |
Constructor Summary | |
---|---|
ForceField(Direction direction,
Color color,
State state)
|
|
ForceField(Terrain terrain,
Direction direction,
Color color,
State state)
|
Method Summary | |
---|---|
void |
onColorEvent(Context ctx,
Cell cell,
Cell origin)
Terrain has received a color event, probably related to the firing of a color event on the board. |
void |
onEnter(Event event,
Player player,
Cell cell,
Direction dir)
Agent attempting to leave the from cell, heading
toward the to cell. |
void |
onFlyOver(Event event,
Cell cell,
InFlightItem flier)
Terrain has an item flying over it. |
void |
onFrame(Context ctx,
Cell cell,
int frame)
Animation callback, executed once each frame for each piece animated on the board. |
boolean |
randomSeed()
Should this animation start with a randomly seeded number as its first frame? For some animations, this can prevent all presentations of the piece on the board executing the same animation frame at the same time. |
Methods inherited from class us.asciiroth.client.terrain.AbstractTerrain |
---|
canEnter, canExit, onAdjacentTo, onAgentEnter, onAgentExit, onDrop, onExit, onNotAdjacentTo, onPickup |
Methods inherited from class us.asciiroth.client.core.AbstractPiece |
---|
getColor, getName, getSymbol, is, not |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface us.asciiroth.client.core.Piece |
---|
getColor, getName, getSymbol, is, not |
Field Detail |
---|
public static final Serializer<ForceField> SERIALIZER
Constructor Detail |
---|
public ForceField(Direction direction, Color color, State state)
public ForceField(Terrain terrain, Direction direction, Color color, State state)
Method Detail |
---|
public void onColorEvent(Context ctx, Cell cell, Cell origin)
ColorListener
onColorEvent
in interface ColorListener
ctx
- a context object with references to game statepublic void onEnter(Event event, Player player, Cell cell, Direction dir)
Terrain
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
public void onFlyOver(Event event, Cell cell, InFlightItem flier)
Terrain
onFlyOver
in interface Terrain
onFlyOver
in class AbstractTerrain
public void onFrame(Context ctx, Cell cell, int frame)
Animated
onFrame
in interface Animated
public boolean randomSeed()
Animated
randomSeed
in interface Animated
|
0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
© 2009 Alx Dark