Browse Source

Klasse SpaceInvadersLevelAua optimiert

master
Laura Faust 3 years ago
parent
commit
e97014efce
  1. 15
      src/playground/SpaceInvadersLevelAua.java

15
src/playground/SpaceInvadersLevelAua.java

@ -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!!");

Loading…
Cancel
Save