bugfix
This commit is contained in:
parent
704ca8e085
commit
52f038d4c4
|
@ -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,7 +215,18 @@ 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
|
||||
);
|
||||
}
|
||||
|
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue