bugfix
This commit is contained in:
parent
704ca8e085
commit
52f038d4c4
@ -107,7 +107,7 @@ public abstract class ShootingEntity extends LivingEntity {
|
|||||||
if(this.currentRocketDelay == 0) {
|
if(this.currentRocketDelay == 0) {
|
||||||
this.createRocket();
|
this.createRocket();
|
||||||
GameScreen.getPlayer().removeRocketAmount();
|
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) {
|
if(this.currentBeamDelay == 0) {
|
||||||
this.createBeam();
|
this.createBeam();
|
||||||
GameScreen.getPlayer().removeBeamAmount();
|
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.getY() + this.shootSpawnY,
|
||||||
this.shootDirection,
|
this.shootDirection,
|
||||||
this.shootSpeed,
|
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
|
this.primaryShotImage
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -233,15 +244,5 @@ public abstract class ShootingEntity extends LivingEntity {
|
|||||||
filename
|
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;
|
package de.teamteamteam.spacescooter.entity.shot;
|
||||||
|
|
||||||
|
import de.teamteamteam.spacescooter.entity.spi.Collidable;
|
||||||
|
|
||||||
public class Beam extends Shot{
|
public class Beam extends Shot{
|
||||||
|
|
||||||
int i =0;
|
int i =0;
|
||||||
@ -16,4 +18,8 @@ public class Beam extends Shot{
|
|||||||
this.remove();
|
this.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void collideWith(Collidable entity) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ public class CollisionHandler {
|
|||||||
int y2 = cOne.getY() + cOne.getHeight();
|
int y2 = cOne.getY() + cOne.getHeight();
|
||||||
int y3 = cTwo.getY();
|
int y3 = cTwo.getY();
|
||||||
int y4 = cTwo.getY() + cTwo.getHeight();
|
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));
|
boolean y_overlap = total_height > Math.abs(Math.max(y2, y4) - Math.min(y1, y3));
|
||||||
|
|
||||||
return x_overlap && y_overlap;
|
return x_overlap && y_overlap;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user