public synchronized void actionPerformed(ActionEvent e) {
if (gamepanel.getCreepPanel().getContext() != null) {
GameContext context = gamepanel.getCreepPanel().getContext();
if (!context.isDead()) {
if (((e.getModifiers() & ActionEvent.SHIFT_MASK) > 0) && context.readyForNewWave()) {
context.sendCreepsWave(context, gamepanel, type);
} else if (context.readyForNewCreep() && context.readyForNewWave()) {
context.sendCreep(context, gamepanel, type);
}
}
}