Dessin des planets encore bien buggé

This commit is contained in:
Damien 2021-05-12 13:06:38 +02:00
parent 63239e35df
commit 39106002a7

View file

@ -1,6 +1,8 @@
package sagittarius.model;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector2;
@ -9,6 +11,7 @@ public class Planet extends EntityCircle {
// ---------- ATTRIBUTEs ----------
float revolutionRate = MathUtils.randomTriangular(1) + 1;
Texture texture = new Texture("core/assets/planet1.png");
// ---------- CONSTRUCTORs ----------
@ -33,4 +36,9 @@ public class Planet extends EntityCircle {
;
}
@Override
public void draw (Batch batch, float parentAlpha) {
batch.draw(texture, getPosition().x - this.radius, getPosition().y - this.radius);
}
}