this.panel = panel;
}
public void actionPerformed(ActionEvent event) {
GameContext conText = this.panel.getContext();
if (!conText.isDead() && conText.readyForNewCreep())
conText.sendCreep(conText, panel, type);
}
}
class SendWaveAction extends SendAction {
public SendWaveAction( IConstants.Creeps type, GamePanel panel ) {
super(type, panel);
}
public void actionPerformed(ActionEvent event) {
GameContext conText = this.panel.getContext();
if (!conText.isDead() && conText.readyForNewWave())
conText.sendCreepsWave(conText, panel, type);
}
}
class BuildAction extends AbstractAction {
protected IConstants.Towers type;
protected GamePanel panel;
public BuildAction( IConstants.Towers type, GamePanel panel ) {
this.type = type;
this.panel = panel;
}
public void actionPerformed(ActionEvent event) {
GameContext conText = this.panel.getContext();
if (!conText.isDead())
conText.buyTower(type);
}
}
//Send Creeps