le code est jste plus beau
This commit is contained in:
parent
1770a819bf
commit
61924b85b6
|
@ -51,10 +51,7 @@ public class Arrow extends EntityQuad {
|
||||||
this.landed = false;
|
this.landed = false;
|
||||||
|
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
Pixmap pm = new Pixmap(new FileHandle(new String[] {
|
Pixmap pm = new Pixmap(new FileHandle("core/assets/arrow" + (random.nextInt(2) + 1) + ".png"));
|
||||||
"core/assets/arrow1.png",
|
|
||||||
"core/assets/arrow2.png"
|
|
||||||
}[random.nextInt(2)]));
|
|
||||||
|
|
||||||
pm.setBlending(Pixmap.Blending.None);
|
pm.setBlending(Pixmap.Blending.None);
|
||||||
for (int x = 0; x < pm.getWidth(); x++) {
|
for (int x = 0; x < pm.getWidth(); x++) {
|
||||||
|
|
|
@ -23,12 +23,7 @@ public class Planet extends EntityCircle {
|
||||||
super(0, mass, color, position, radius);
|
super(0, mass, color, position, radius);
|
||||||
|
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
Pixmap pm = new Pixmap(new FileHandle(new String[] {
|
Pixmap pm = new Pixmap(new FileHandle("core/assets/planet" + random.nextInt(5) + ".png"));
|
||||||
"core/assets/planet1.png",
|
|
||||||
"core/assets/planet2.png",
|
|
||||||
"core/assets/planet3.png",
|
|
||||||
"core/assets/planet4.png"
|
|
||||||
}[random.nextInt(4)]));
|
|
||||||
|
|
||||||
pm.setBlending(Pixmap.Blending.None);
|
pm.setBlending(Pixmap.Blending.None);
|
||||||
for (int x = 0; x < pm.getWidth(); x++) {
|
for (int x = 0; x < pm.getWidth(); x++) {
|
||||||
|
|
Loading…
Reference in a new issue