us.asciiroth.client.agents
Class Tumbleweed
java.lang.Object
us.asciiroth.client.core.AbstractPiece
us.asciiroth.client.agents.AbstractAgent
us.asciiroth.client.agents.AbstractAnimatedAgent
us.asciiroth.client.agents.Tumbleweed
- All Implemented Interfaces:
- Agent, Animated, Piece
public class Tumbleweed
- extends AbstractAnimatedAgent
A decorative piece that tumbles across the board in the indicated direction.
It doesn't really do anything but lend color to desert boards. By the gods,
this piece was complicated to make...
Method Summary |
void |
onFrame(Context ctx,
Cell cell,
int frame)
Animation callback, executed once each frame for each piece
animated on the board. |
void |
onHitBy(Event event,
Cell agentLoc,
Agent agent,
Direction dir)
Called when this agent is hit by another agent (another agent collides
with it). |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERIALIZER
public static final Serializer<Tumbleweed> SERIALIZER
- Type serializer.
Tumbleweed
public Tumbleweed(Direction direction)
- Constructor.
- Parameters:
direction
- the direction the tumbleweed will tumble
onFrame
public void onFrame(Context ctx,
Cell cell,
int frame)
- Description copied from interface:
Animated
- Animation callback, executed once each frame for each piece
animated on the board.
onHitBy
public void onHitBy(Event event,
Cell agentLoc,
Agent agent,
Direction dir)
- Description copied from interface:
Agent
- Called when this agent is hit by another agent (another agent collides
with it). Typically the move event will be cancelled in this method,
unless this agent moves itself out of the way, such as boulders attempt to do.
- Specified by:
onHitBy
in interface Agent
- Overrides:
onHitBy
in class AbstractAgent
© 2009 Alx Dark