us.asciiroth.client.agents
Class Triffid

java.lang.Object
  extended by us.asciiroth.client.core.AbstractPiece
      extended by us.asciiroth.client.agents.AbstractAgent
          extended by us.asciiroth.client.agents.AbstractAnimatedAgent
              extended by us.asciiroth.client.agents.Triffid
All Implemented Interfaces:
Agent, Animated, Piece

public class Triffid
extends AbstractAnimatedAgent

A Triffid. I love the radio show that was made out of this story in the '50s. (Actually, I love all radio drama, it fuels the production of this game. So, homage.)

Triffids move relatively slowly but shoot poison darts that prevent the player from being able to heal with Healers. So they're a drag. Fires a color event when killed.


Field Summary
static Serializer<Triffid> SERIALIZER
          Type serializer.
 
Constructor Summary
Triffid(Color color)
          Constructor.
 
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).
 
Methods inherited from class us.asciiroth.client.agents.AbstractAnimatedAgent
randomSeed
 
Methods inherited from class us.asciiroth.client.agents.AbstractAgent
canEnter, changeHealth, onDie, onHitBy, onHitBy
 
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

SERIALIZER

public static final Serializer<Triffid> SERIALIZER
Type serializer.

Constructor Detail

Triffid

public Triffid(Color color)
Constructor.

Parameters:
color -
Method Detail

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

0.7

© 2009 Alx Dark