So this codeA:
Code:
public FiringCommandGroup extends CommandGroup {
public FiringCommandGroup() {
addSequential(new FireCommand1());
addSeqiential(new waitCommand(1));
addSequential(new FireCommand2());
}
}
...is quite different than this codeB:
Code:
public void execute() {
if (timeSinceInitialized() < sometime) {
do something;
} else if(timeSinceInitialized() < some bigger time) {
do nothing;
} else {
do something2;
}
}
...because codeA executes FireCommand1()
once, then waits, then executes FireCommand2()
once, and exits.
whereas codeB executes "something"
repeatedly, then waits, then executes "something2"
repeatedly.
Yes?