Changed Chance to Spawn for Explosions
This commit is contained in:
parent
6b136e18e3
commit
ec140905ee
@ -81,14 +81,13 @@ public abstract class LivingEntity extends Entity implements Collidable {
|
||||
if (this.isAlive() == false) {
|
||||
if(GameConfig.DEBUG) System.out.println(this + " ist gestorben. RIP");
|
||||
this.explode();
|
||||
//Screen.currentScreen.addEntity(new Explosion(this.x, this.y));
|
||||
this.remove();
|
||||
}
|
||||
}
|
||||
|
||||
private void explode() {
|
||||
Random rnd = new Random();
|
||||
if (rnd.nextInt(10) < 7) {
|
||||
if (rnd.nextInt(99) < 70) {
|
||||
Screen.currentScreen.addEntity(new Explosion(this.x, this.y));
|
||||
} else {
|
||||
Screen.currentScreen.addEntity(new ExplosionBig(this.x, this.y));
|
||||
|
Loading…
Reference in New Issue
Block a user