us.asciiroth.client.items
Class AmmoGun
java.lang.Object
us.asciiroth.client.core.AbstractPiece
us.asciiroth.client.items.AbstractItem
us.asciiroth.client.items.AmmoGun
- All Implemented Interfaces:
- Item, Piece, ConsumesAmmo
public class AmmoGun
- extends AbstractItem
- implements ConsumesAmmo
A gun that shoots bullets. (Well, yes, most guns do shoot bullets.)
Method Summary |
Item |
getAmmoType()
|
Item |
onFire(Event event)
If this item can fire any kind of projectile, it should return it
when this method is executed. |
void |
onUse(Event event)
The player has used the item without indicating any particular direction
for use. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERIALIZER
public static final Serializer<AmmoGun> SERIALIZER
- Type serializer.
getAmmoType
public Item getAmmoType()
- Specified by:
getAmmoType
in interface ConsumesAmmo
onFire
public Item onFire(Event event)
- Description copied from interface:
Item
- If this item can fire any kind of projectile, it should return it
when this method is executed.
- Specified by:
onFire
in interface Item
- Overrides:
onFire
in class AbstractItem
- Returns:
- an item that is the ammunition for this item when fired.
onUse
public void onUse(Event event)
- Description copied from interface:
Item
- The player has used the item without indicating any particular direction
for use. Even if the item has no intrinsic use, it's helpful to cancel the
event with a message explaining that the item requires a direction to be
useful.
- Specified by:
onUse
in interface Item
- Overrides:
onUse
in class AbstractItem
© 2009 Alx Dark