diff --git a/core/src/hu/wolfman/deimos/entities/Bullet.java b/core/src/hu/wolfman/deimos/entities/Bullet.java index b61f33d..5e1d9cf 100644 --- a/core/src/hu/wolfman/deimos/entities/Bullet.java +++ b/core/src/hu/wolfman/deimos/entities/Bullet.java @@ -6,6 +6,7 @@ import hu.wolfman.deimos.physics.BodyBuilder; import hu.wolfman.deimos.physics.FixtureBuilder; +import hu.wolfman.deimos.utils.Resources; import static hu.wolfman.deimos.Constants.*; @@ -23,15 +24,13 @@ public class Bullet extends Entity { * A töltény konstruktora. * * @param world Box2D világ - * @param baseTexture A töltény textúrája * @param x X koordináta * @param y Y koordináta * @param isFlyingRight Meghatározza, hogy milyen irányba repül * @param owner A tulajdonos objektum */ - public Bullet(World world, TextureRegion baseTexture, - float x, float y, boolean isFlyingRight, Object owner) { - super(world, baseTexture); + public Bullet(World world, float x, float y, boolean isFlyingRight, Object owner) { + super(world, new TextureRegion(Resources.get().texture("bullet"))); this.owner = owner; this.isEnemy = owner instanceof Enemy; diff --git a/core/src/hu/wolfman/deimos/entities/Enemy.java b/core/src/hu/wolfman/deimos/entities/Enemy.java index deec94a..bd25b61 100644 --- a/core/src/hu/wolfman/deimos/entities/Enemy.java +++ b/core/src/hu/wolfman/deimos/entities/Enemy.java @@ -163,7 +163,6 @@ public void fire() { Resources.get().sound("shoot").play(); bullets.add(new Bullet( world, - new TextureRegion(Resources.get().texture("bullet")), getX() * PPM + 5, getY() * PPM + 30, false, diff --git a/core/src/hu/wolfman/deimos/entities/Player.java b/core/src/hu/wolfman/deimos/entities/Player.java index 22240db..703fabe 100644 --- a/core/src/hu/wolfman/deimos/entities/Player.java +++ b/core/src/hu/wolfman/deimos/entities/Player.java @@ -208,7 +208,6 @@ public void fire() { Resources.get().sound("shoot").play(); bullets.add(new Bullet( world, - new TextureRegion(Resources.get().texture("bullet")), facingRight ? getX() * PPM + width - 5 : getX() * PPM + 5, getY() * PPM + 30, facingRight,