us.asciiroth.client.items
Class Bomb

java.lang.Object
  extended by us.asciiroth.client.core.AbstractPiece
      extended by us.asciiroth.client.items.AbstractItem
          extended by us.asciiroth.client.items.Bomb
All Implemented Interfaces:
Animated, Item, Piece

public class Bomb
extends AbstractItem
implements Animated

An item that can be left on the ground that all agents will obligingly walk right into, causing an explosion that will wipe many of them out. This piece is about the only safe way to get rid of certain agents, like the Cephalid. It will not explode when the player walks over it.


Field Summary
static Serializer<Bomb> SERIALIZER
          Type serializer.
 
Constructor Summary
Bomb()
          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 onSteppedOn(Event event, Cell agentLoc, Agent agent)
          Notification that an agent has entered the same square as this item.
 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.items.AbstractItem
getDefiniteNoun, getIndefiniteNoun, onDeselect, onDrop, onFire, onHit, onSelect, onThrow, onThrowEnd, onUse
 
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<Bomb> SERIALIZER
Type serializer.

Constructor Detail

Bomb

public Bomb()
Constructor.

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.

Specified by:
onFrame in interface Animated

onSteppedOn

public void onSteppedOn(Event event,
                        Cell agentLoc,
                        Agent agent)
Description copied from interface: Item
Notification that an agent has entered the same square as this item.

Specified by:
onSteppedOn in interface Item
Overrides:
onSteppedOn in class AbstractItem

randomSeed

public boolean randomSeed()
Description copied from interface: Animated
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.

Specified by:
randomSeed in interface Animated
Returns:
true if a random frame should begin the animated piece's timeline

0.7

© 2009 Alx Dark