fix: fucking broken shit

This commit is contained in:
Laureηt 2021-05-15 22:50:47 +02:00
parent 49a8b39f9e
commit a2d445ef62
3 changed files with 7 additions and 6 deletions

View file

@ -60,12 +60,12 @@ public class Arrow extends EntityQuad {
arrowHitSound = Gdx.audio.newSound(Gdx.files.internal("sounds/effects/player_death.wav"));
texture = new ArrayList<>();
String path = "core/assets/arrow" + MathUtils.random(2);
String path = "arrow" + MathUtils.random(2);
int i = 0;
while (true) {
try {
Pixmap pm = new Pixmap(new FileHandle(path + "-" + i + ".png"));
Pixmap pm = new Pixmap(Gdx.files.internal(path + "-" + i + ".png"));
pm.setBlending(Pixmap.Blending.None);
for (int x = 0; x < pm.getWidth(); x++) {
for (int y = 0; y < pm.getHeight(); y++) {

View file

@ -1,5 +1,6 @@
package sagittarius.model;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Pixmap;
@ -20,7 +21,7 @@ public class Planet extends EntityCircle {
public Planet(Vector2 position, float mass, float radius, Color color) {
super(0, mass, color, position, radius);
Pixmap pm = new Pixmap(new FileHandle("core/assets/planet" + MathUtils.random(4) + ".png"));
Pixmap pm = new Pixmap(Gdx.files.internal("planet" + MathUtils.random(4) + ".png"));
pm.setBlending(Pixmap.Blending.None);
for (int x = 0; x < pm.getWidth(); x++) {
@ -40,7 +41,7 @@ public class Planet extends EntityCircle {
}
texture = new Texture(pm);
pm = new Pixmap(new FileHandle("core/assets/planet0.png"));
pm = new Pixmap(Gdx.files.internal("planet0.png"));
pm.setBlending(Pixmap.Blending.None);
for (int x = 0; x < pm.getWidth(); x++) {
for (int y = 0; y < pm.getHeight(); y++) {

View file

@ -33,12 +33,12 @@ public class Player extends EntityQuad {
this.home = home;
texture = new ArrayList<>();
String path = "core/assets/player0";
String path = "player0";
int i = 0;
while (true) {
try {
Pixmap pm = new Pixmap(new FileHandle(path + "-" + i + ".png"));
Pixmap pm = new Pixmap(Gdx.files.internal(path + "-" + i + ".png"));
pm.setBlending(Pixmap.Blending.None);
for (int x = 0; x < pm.getWidth(); x++) {
for (int y = 0; y < pm.getHeight(); y++) {