diff --git a/src/de/teamteamteam/spacescooter/entity/ShootingEntity.java b/src/de/teamteamteam/spacescooter/entity/ShootingEntity.java index 618f308..3c9b443 100644 --- a/src/de/teamteamteam/spacescooter/entity/ShootingEntity.java +++ b/src/de/teamteamteam/spacescooter/entity/ShootingEntity.java @@ -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; + } + } diff --git a/src/de/teamteamteam/spacescooter/entity/enemy/Enemy.java b/src/de/teamteamteam/spacescooter/entity/enemy/Enemy.java index 2289bc3..357fed7 100644 --- a/src/de/teamteamteam/spacescooter/entity/enemy/Enemy.java +++ b/src/de/teamteamteam/spacescooter/entity/enemy/Enemy.java @@ -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()); + } + }