diff --git a/src/de/teamteamteam/spacescooter/entity/ShootingEntity.java b/src/de/teamteamteam/spacescooter/entity/ShootingEntity.java index 7d6dfea..c2adf47 100644 --- a/src/de/teamteamteam/spacescooter/entity/ShootingEntity.java +++ b/src/de/teamteamteam/spacescooter/entity/ShootingEntity.java @@ -107,7 +107,7 @@ public abstract class ShootingEntity extends LivingEntity { if(this.currentRocketDelay == 0) { this.createRocket(); GameScreen.getPlayer().removeRocketAmount(); - this.currentRocketDelay = this.shootDelay*3; + this.currentRocketDelay = this.shootDelay*2; } } } @@ -117,7 +117,7 @@ public abstract class ShootingEntity extends LivingEntity { if(this.currentBeamDelay == 0) { this.createBeam(); GameScreen.getPlayer().removeBeamAmount(); - this.currentBeamDelay = this.shootDelay; + this.currentBeamDelay = this.shootDelay*2; } } } @@ -215,11 +215,22 @@ public abstract class ShootingEntity extends LivingEntity { this.getY() + this.shootSpawnY, this.shootDirection, this.shootSpeed, - (int)(this.shootDamage*1.5), + (int)(this.shootDamage*1.2), this.primaryShotImage ); } + public void createBeam() { + new Beam( + this.getX() + this.shootSpawnX, + this.getY() + this.shootSpawnY, + this.shootDirection, + this.shootSpeed, + this.shootDamage, + this.primaryShotImage + ); + } + /** * Custom Shoot for Custom Action!!! */ @@ -233,15 +244,5 @@ public abstract class ShootingEntity extends LivingEntity { filename ); } - public void createBeam() { - new Beam( - this.getX() + this.shootSpawnX, - this.getY() + this.shootSpawnY, - this.shootDirection, - this.shootSpeed, - this.shootDamage, - this.primaryShotImage - ); - } } diff --git a/src/de/teamteamteam/spacescooter/entity/shot/Beam.java b/src/de/teamteamteam/spacescooter/entity/shot/Beam.java index f7c3538..bd4c813 100644 --- a/src/de/teamteamteam/spacescooter/entity/shot/Beam.java +++ b/src/de/teamteamteam/spacescooter/entity/shot/Beam.java @@ -1,5 +1,7 @@ package de.teamteamteam.spacescooter.entity.shot; +import de.teamteamteam.spacescooter.entity.spi.Collidable; + public class Beam extends Shot{ int i =0; @@ -16,4 +18,8 @@ public class Beam extends Shot{ this.remove(); } } + + @Override + public void collideWith(Collidable entity) { + } } diff --git a/src/de/teamteamteam/spacescooter/utility/CollisionHandler.java b/src/de/teamteamteam/spacescooter/utility/CollisionHandler.java index 73617d5..40d07b8 100644 --- a/src/de/teamteamteam/spacescooter/utility/CollisionHandler.java +++ b/src/de/teamteamteam/spacescooter/utility/CollisionHandler.java @@ -75,7 +75,7 @@ public class CollisionHandler { int y2 = cOne.getY() + cOne.getHeight(); int y3 = cTwo.getY(); int y4 = cTwo.getY() + cTwo.getHeight(); - int total_height = cOne.getWidth() + cTwo.getWidth(); + int total_height = cOne.getHeight() + cTwo.getHeight(); boolean y_overlap = total_height > Math.abs(Math.max(y2, y4) - Math.min(y1, y3)); return x_overlap && y_overlap;