gegner ballern nun rot

This commit is contained in:
lubiana 2014-11-06 16:15:50 +01:00
parent 46efd1e04e
commit 3df49e2be6
2 changed files with 23 additions and 0 deletions

View File

@ -76,4 +76,21 @@ public abstract class ShootingEntity extends LivingEntity {
public int getDamageValue(){
return this.damageValue;
}
protected int getShootSpawnX(){
return this.shootSpawnX;
}
protected int getShootSpawnY(){
return this.shootSpawnY;
}
protected int getShootDirection(){
return this.shootDirection;
}
protected int getShootSpeed(){
return this.shootSpeed;
}
}

View File

@ -3,6 +3,7 @@ import java.util.Random;
import de.teamteamteam.spacescooter.entity.ShootingEntity;
import de.teamteamteam.spacescooter.entity.shot.Shot;
import de.teamteamteam.spacescooter.entity.shot.SingleRedShot;
public abstract class Enemy extends ShootingEntity {
@ -23,5 +24,10 @@ public abstract class Enemy extends ShootingEntity {
this.shoot();
}
@Override
public void createShot() {
new SingleRedShot(super.getX() + super.getShootSpawnX(), super.getY() + super.getShootSpawnY(), super.getShootDirection(), super.getShootSpeed(), super.getDamageValue());
}
}