From 3df49e2be6eba95105051c5999f5073f98872bfa Mon Sep 17 00:00:00 2001 From: lubiana Date: Thu, 6 Nov 2014 16:15:50 +0100 Subject: [PATCH] gegner ballern nun rot --- .../spacescooter/entity/ShootingEntity.java | 17 +++++++++++++++++ .../spacescooter/entity/enemy/Enemy.java | 6 ++++++ 2 files changed, 23 insertions(+) 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()); + } + }