moagg.model.weapon
Class WeaponList

java.lang.Object
  extended by moagg.model.weapon.WeaponList
All Implemented Interfaces:
Weapon
Direct Known Subclasses:
BarrelList, BarrelList

public abstract class WeaponList
extends java.lang.Object
implements Weapon


Constructor Summary
WeaponList()
           
 
Method Summary
 void addWeapon(Weapon weapon)
           
 java.util.List<Weapon> getWeapons()
           
 boolean isShoot()
          Called by the game control (via the game object) in each frame.
 void setShoot(boolean shoot)
          Normally this method is called by the game object in each frame.
 void update(long elapsedTime)
          Must be called by the game object for each frame, since weapon implementations may have internal timers of some kind.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeaponList

public WeaponList()
Method Detail

addWeapon

public void addWeapon(Weapon weapon)

getWeapons

public java.util.List<Weapon> getWeapons()

isShoot

public boolean isShoot()
Description copied from interface: Weapon
Called by the game control (via the game object) in each frame. This method must not modify the internal state of the weapon, because it might be called multiple times by the game control.

Specified by:
isShoot in interface Weapon
Returns:
true if a shot shall be fired, else false.

setShoot

public void setShoot(boolean shoot)
Description copied from interface: Weapon
Normally this method is called by the game object in each frame.

Specified by:
setShoot in interface Weapon
Parameters:
shoot - true if the "fire button is pressed", else false.

update

public void update(long elapsedTime)
Description copied from interface: Weapon
Must be called by the game object for each frame, since weapon implementations may have internal timers of some kind.

Specified by:
update in interface Weapon


Copyright © 2008. All Rights Reserved.