diff --git a/core/assets/arrow0.png b/core/assets/arrow0.png new file mode 100644 index 0000000..0e49025 Binary files /dev/null and b/core/assets/arrow0.png differ diff --git a/core/assets/arrow1.png b/core/assets/arrow1.png index 0e49025..d1aae48 100644 Binary files a/core/assets/arrow1.png and b/core/assets/arrow1.png differ diff --git a/core/assets/arrow2.png b/core/assets/arrow2.png deleted file mode 100644 index d1aae48..0000000 Binary files a/core/assets/arrow2.png and /dev/null differ diff --git a/core/src/sagittarius/model/Arrow.java b/core/src/sagittarius/model/Arrow.java index 73938ce..e95d383 100644 --- a/core/src/sagittarius/model/Arrow.java +++ b/core/src/sagittarius/model/Arrow.java @@ -1,9 +1,5 @@ package sagittarius.model; -import java.security.PrivilegedExceptionAction; -import java.util.ArrayList; -import java.util.Random; - import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Pixmap; @@ -11,6 +7,7 @@ import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.graphics.glutils.ShapeRenderer; import com.badlogic.gdx.math.Intersector; +import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.scenes.scene2d.Actor; @@ -52,8 +49,7 @@ public class Arrow extends EntityQuad { this.landed = false; if (!preview) { - Random random = new Random(); - Pixmap pm = new Pixmap(new FileHandle("core/assets/arrow" + (random.nextInt(2) + 1) + ".png")); + Pixmap pm = new Pixmap(new FileHandle("core/assets/arrow" + MathUtils.random(1) + ".png")); pm.setBlending(Pixmap.Blending.None); for (int x = 0; x < pm.getWidth(); x++) { for (int y = 0; y < pm.getHeight(); y++) { diff --git a/core/src/sagittarius/model/Planet.java b/core/src/sagittarius/model/Planet.java index 1883f3e..cced674 100644 --- a/core/src/sagittarius/model/Planet.java +++ b/core/src/sagittarius/model/Planet.java @@ -1,7 +1,5 @@ package sagittarius.model; -import java.util.Random; - import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Pixmap; @@ -22,8 +20,7 @@ public class Planet extends EntityCircle { public Planet(Vector2 position, float mass, float radius, Color color) { super(0, mass, color, position, radius); - Random random = new Random(); - Pixmap pm = new Pixmap(new FileHandle("core/assets/planet" + random.nextInt(5) + ".png")); + Pixmap pm = new Pixmap(new FileHandle("core/assets/planet" + MathUtils.random(4) + ".png")); pm.setBlending(Pixmap.Blending.None); for (int x = 0; x < pm.getWidth(); x++) {