All Entities have to implement explode() from now on.
This commit is contained in:
parent
2ed07b430a
commit
63e7b7a21c
@ -1,10 +1,12 @@
|
|||||||
name:Lustiger Levelname
|
name:Lustiger Levelname
|
||||||
backgroundMusic:music/bla.wav
|
backgroundMusic:music/bla.wav
|
||||||
background:FooBackground
|
background:StarBackground
|
||||||
-
|
-
|
||||||
[0-20]
|
[0-4]
|
||||||
spawn:EnemyTwo,2,2
|
spawn:EnemyBoss,1,1
|
||||||
[21-25]
|
[5-10]
|
||||||
|
spawn:EnemyTwo,2,10
|
||||||
|
[11-25]
|
||||||
spawn:EnemyThree,2,4
|
spawn:EnemyThree,2,4
|
||||||
spawn:EnemyTwo,5,6
|
spawn:EnemyTwo,5,6
|
||||||
[26-30]
|
[26-30]
|
||||||
|
@ -109,7 +109,7 @@ public abstract class LivingEntity extends CollidableEntity implements Hittable
|
|||||||
* The default way the LivingEntity explodes. Override this method for a
|
* The default way the LivingEntity explodes. Override this method for a
|
||||||
* different explosion behaviour.
|
* different explosion behaviour.
|
||||||
*/
|
*/
|
||||||
public void explode() {}
|
public abstract void explode();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default way the LivingEntity dies. Override this method for a
|
* The default way the LivingEntity dies. Override this method for a
|
||||||
|
@ -126,7 +126,6 @@ public class Player extends ShootingEntity implements KeyboardListener {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void explode() {
|
public void explode() {
|
||||||
super.explode();
|
|
||||||
SoundSystem.playSound("sounds/abgang.wav");
|
SoundSystem.playSound("sounds/abgang.wav");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@ package de.teamteamteam.spacescooter.entity.enemy;
|
|||||||
import java.awt.Point;
|
import java.awt.Point;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import de.teamteamteam.spacescooter.entity.explosion.ExplosionOne;
|
||||||
|
|
||||||
public class EnemyFour extends Enemy{
|
public class EnemyFour extends Enemy{
|
||||||
|
|
||||||
private ArrayList<Point> points;
|
private ArrayList<Point> points;
|
||||||
@ -61,5 +63,10 @@ public class EnemyFour extends Enemy{
|
|||||||
this.remove();
|
this.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void explode() {
|
||||||
|
new ExplosionOne(this.getX(), this.getY());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package de.teamteamteam.spacescooter.entity.enemy;
|
package de.teamteamteam.spacescooter.entity.enemy;
|
||||||
|
|
||||||
|
import de.teamteamteam.spacescooter.entity.explosion.ExplosionOne;
|
||||||
|
|
||||||
public class EnemyOne extends Enemy {
|
public class EnemyOne extends Enemy {
|
||||||
|
|
||||||
public EnemyOne(int x, int y) {
|
public EnemyOne(int x, int y) {
|
||||||
@ -20,5 +22,10 @@ public class EnemyOne extends Enemy {
|
|||||||
public void update() {
|
public void update() {
|
||||||
super.update();
|
super.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void explode() {
|
||||||
|
new ExplosionOne(this.getX(), this.getY());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package de.teamteamteam.spacescooter.entity.enemy;
|
package de.teamteamteam.spacescooter.entity.enemy;
|
||||||
|
|
||||||
|
import de.teamteamteam.spacescooter.entity.explosion.ExplosionTwo;
|
||||||
import de.teamteamteam.spacescooter.utility.GameConfig;
|
import de.teamteamteam.spacescooter.utility.GameConfig;
|
||||||
import de.teamteamteam.spacescooter.utility.Random;
|
import de.teamteamteam.spacescooter.utility.Random;
|
||||||
|
|
||||||
@ -28,5 +29,10 @@ public class EnemyTwo extends Enemy{
|
|||||||
this.remove();
|
this.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void explode() {
|
||||||
|
new ExplosionTwo(this.getX(), this.getY());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ public class GameConfig {
|
|||||||
/**
|
/**
|
||||||
* Whether debug output (and more) is enabled or disabled.
|
* Whether debug output (and more) is enabled or disabled.
|
||||||
*/
|
*/
|
||||||
public static boolean DEBUG = false;
|
public static boolean DEBUG = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Width of GameWindow.
|
* Width of GameWindow.
|
||||||
|
Loading…
Reference in New Issue
Block a user