Dessin des planets encore bien buggé
This commit is contained in:
parent
63239e35df
commit
39106002a7
|
@ -1,6 +1,8 @@
|
||||||
package sagittarius.model;
|
package sagittarius.model;
|
||||||
|
|
||||||
import com.badlogic.gdx.graphics.Color;
|
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.MathUtils;
|
||||||
import com.badlogic.gdx.math.Vector2;
|
import com.badlogic.gdx.math.Vector2;
|
||||||
|
|
||||||
|
@ -9,6 +11,7 @@ public class Planet extends EntityCircle {
|
||||||
// ---------- ATTRIBUTEs ----------
|
// ---------- ATTRIBUTEs ----------
|
||||||
|
|
||||||
float revolutionRate = MathUtils.randomTriangular(1) + 1;
|
float revolutionRate = MathUtils.randomTriangular(1) + 1;
|
||||||
|
Texture texture = new Texture("core/assets/planet1.png");
|
||||||
|
|
||||||
// ---------- CONSTRUCTORs ----------
|
// ---------- 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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue