us.asciiroth.client.agents
Class Cephalid
java.lang.Object
us.asciiroth.client.core.AbstractPiece
us.asciiroth.client.agents.AbstractAgent
us.asciiroth.client.agents.AbstractAnimatedAgent
us.asciiroth.client.agents.Cephalid
- All Implemented Interfaces:
- Agent, Animated, Piece
public class Cephalid
- extends AbstractAnimatedAgent
Cephalids have both a ranged and melee-based ability to turn the
player to stone. There's almost no hope of the player turning back
again once stonified, although if a color event occurs thats the
same color as the Cephalid
, the player would recover.
Method Summary |
void |
onFrame(Context ctx,
Cell cell,
int frame)
Animation callback, executed once each frame for each piece
animated on the board. |
void |
onHit(Event event,
Cell attackerLoc,
Cell agentLoc,
Agent agent)
Fired when this agent collides with the player, or if this agent is the player,
when the player collides with another agent (in other words, this method will
not fire if one non-player agent collides with another non-player agent). |
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<Cephalid> SERIALIZER
- Type serializer.
Cephalid
public Cephalid(Color color)
- Constructor.
- Parameters:
color
-
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.
onHit
public void onHit(Event event,
Cell attackerLoc,
Cell agentLoc,
Agent agent)
- Description copied from interface:
Agent
- Fired when this agent collides with the player, or if this agent is the player,
when the player collides with another agent (in other words, this method will
not fire if one non-player agent collides with another non-player agent).
- Specified by:
onHit
in interface Agent
- Overrides:
onHit
in class AbstractAgent
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