|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object moagg.model.weapon.WeaponDecorator
public abstract class WeaponDecorator
Weapon implementations may be enhanced by decorators extending this class.
Constructor Summary | |
---|---|
protected |
WeaponDecorator()
|
protected |
WeaponDecorator(Weapon weapon)
|
Method Summary | |
---|---|
Weapon |
getWeapon()
|
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 |
setWeapon(Weapon weapon)
|
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 |
---|
protected WeaponDecorator()
protected WeaponDecorator(Weapon weapon)
Method Detail |
---|
public void setWeapon(Weapon weapon)
public Weapon getWeapon()
public boolean isShoot()
Weapon
isShoot
in interface Weapon
public void setShoot(boolean shoot)
Weapon
setShoot
in interface Weapon
shoot
- true if the "fire button is pressed", else false.public void update(long elapsedTime)
Weapon
update
in interface Weapon
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |