com.jpemartin.jgt
Class FireSequence

java.lang.Object
  extended by com.jpemartin.jgt.FireSequence
All Implemented Interfaces:
FireControl

public class FireSequence
extends java.lang.Object
implements FireControl

a FireControl that fires according to a set sequence, in a loop.


Constructor Summary
FireSequence()
           
 
Method Summary
 void addSequence(int coolingTime, int shotCount)
          Add "shotCount" shots to the sequence, with a pause of "coolingTime" between each shot.
 boolean shouldFire()
          call this every turn, it will return true if you should fire
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FireSequence

public FireSequence()
Method Detail

addSequence

public void addSequence(int coolingTime,
                        int shotCount)
Add "shotCount" shots to the sequence, with a pause of "coolingTime" between each shot.


shouldFire

public boolean shouldFire()
Description copied from interface: FireControl
call this every turn, it will return true if you should fire

Specified by:
shouldFire in interface FireControl