From 474b8fc5e761a0a9fe97b87d539c4f853ad7f4e2 Mon Sep 17 00:00:00 2001 From: Damien Date: Wed, 12 May 2021 13:14:38 +0200 Subject: [PATCH] les tailles sont bonnes --- core/src/sagittarius/model/Planet.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/sagittarius/model/Planet.java b/core/src/sagittarius/model/Planet.java index ea9a8f9..ba5d9e9 100644 --- a/core/src/sagittarius/model/Planet.java +++ b/core/src/sagittarius/model/Planet.java @@ -11,12 +11,13 @@ public class Planet extends EntityCircle { // ---------- ATTRIBUTEs ---------- float revolutionRate = MathUtils.randomTriangular(1) + 1; - Texture texture = new Texture("core/assets/planet1.png"); + Texture texture; // ---------- CONSTRUCTORs ---------- public Planet(Vector2 position, float mass, float radius, Color color) { super(0, mass, color, position, radius); + this.texture = new Texture("core/assets/planet1.png"); } // ---------- METHODs ---------- @@ -38,7 +39,7 @@ public class Planet extends EntityCircle { @Override public void draw (Batch batch, float parentAlpha) { - batch.draw(texture, getPosition().x - this.radius, getPosition().y - this.radius); + batch.draw(texture, getPosition().x - this.radius, getPosition().y - this.radius, 2 * this.radius, 2 * this.radius); } }