|
@ -53,20 +53,7 @@ public class SpaceInvadersLevelAua extends SpaceInvadersLevel { |
|
|
@Override |
|
|
@Override |
|
|
void actionIfEnemyIsHit(GameObject e, GameObject shot) { |
|
|
void actionIfEnemyIsHit(GameObject e, GameObject shot) { |
|
|
|
|
|
|
|
|
double gameTime = this.getGameTime(); |
|
|
|
|
|
createExplosion(gameTime, e, "shard", DYING_INTERVAL, Color.RED); |
|
|
|
|
|
|
|
|
|
|
|
Music.music(smash); |
|
|
|
|
|
|
|
|
|
|
|
// delete enemy |
|
|
|
|
|
deleteObject(e.getId()); |
|
|
|
|
|
|
|
|
|
|
|
// delete shot |
|
|
|
|
|
deleteObject(shot.getId()); |
|
|
|
|
|
|
|
|
|
|
|
// add to points counter |
|
|
|
|
|
Integer pts = (Integer) getGlobalFlag("points"); |
|
|
|
|
|
setGlobalFlag("points", pts + 200); |
|
|
|
|
|
|
|
|
super.actionIfEnemyIsHit(e, shot); //Methode aus Elternklasse |
|
|
|
|
|
|
|
|
//print aua on console |
|
|
//print aua on console |
|
|
System.out.println("AUA!!"); |
|
|
System.out.println("AUA!!"); |
|
|