diff --git a/core/src/bzh/fainsin/sagittarius/Arrow.java b/core/src/sagittarius/Arrow.java similarity index 93% rename from core/src/bzh/fainsin/sagittarius/Arrow.java rename to core/src/sagittarius/Arrow.java index 9a7e912..1acd073 100644 --- a/core/src/bzh/fainsin/sagittarius/Arrow.java +++ b/core/src/sagittarius/Arrow.java @@ -1,4 +1,4 @@ -package bzh.fainsin.sagittarius; +package sagittarius; import java.util.ArrayList; @@ -106,9 +106,9 @@ class Arrow extends Entity { path.add(dummyArrow.position.y); } - // TODO : optimize, lots of useless stuff + // TODO : optimize, lots of useless stuff + change name - final float[] arr = new float[path.size()]; // TODO : min with 2, Exception in thread "main" java.lang.IllegalArgumentException: Polylines must contain at least 2 points. + final float[] arr = new float[path.size()]; int index = 0; for (final Float value: path) { arr[index++] = value; diff --git a/core/src/bzh/fainsin/sagittarius/Bow.java b/core/src/sagittarius/Bow.java similarity index 94% rename from core/src/bzh/fainsin/sagittarius/Bow.java rename to core/src/sagittarius/Bow.java index 3a44162..2116db3 100644 --- a/core/src/bzh/fainsin/sagittarius/Bow.java +++ b/core/src/sagittarius/Bow.java @@ -1,4 +1,4 @@ -package bzh.fainsin.sagittarius; +package sagittarius; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input.Buttons; @@ -56,7 +56,7 @@ class Bow { public void render(ShapeRenderer shapeRenderer) { if (pressed) { shapeRenderer.line(this.anchor, SagittariusGame.worldCursor); - float[] traj = Arrow.traj(angle, power, shooter, 250, 0.05f); + float[] traj = Arrow.traj(angle, power, shooter, 400, 0.05f); if (traj.length > 2) { shapeRenderer.polyline(traj); } diff --git a/core/src/bzh/fainsin/sagittarius/Entity.java b/core/src/sagittarius/Entity.java similarity index 95% rename from core/src/bzh/fainsin/sagittarius/Entity.java rename to core/src/sagittarius/Entity.java index 6cd19d0..b69dab6 100644 --- a/core/src/bzh/fainsin/sagittarius/Entity.java +++ b/core/src/sagittarius/Entity.java @@ -1,4 +1,4 @@ -package bzh.fainsin.sagittarius; +package sagittarius; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.math.Vector2; diff --git a/core/src/bzh/fainsin/sagittarius/GameScreen.java b/core/src/sagittarius/GameScreen.java similarity index 99% rename from core/src/bzh/fainsin/sagittarius/GameScreen.java rename to core/src/sagittarius/GameScreen.java index 8fdd20b..f0e870d 100644 --- a/core/src/bzh/fainsin/sagittarius/GameScreen.java +++ b/core/src/sagittarius/GameScreen.java @@ -1,4 +1,4 @@ -package bzh.fainsin.sagittarius; +package sagittarius; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.ScreenAdapter; diff --git a/core/src/bzh/fainsin/sagittarius/HUD.java b/core/src/sagittarius/HUD.java similarity index 94% rename from core/src/bzh/fainsin/sagittarius/HUD.java rename to core/src/sagittarius/HUD.java index 0c25da1..c33b9bc 100644 --- a/core/src/bzh/fainsin/sagittarius/HUD.java +++ b/core/src/sagittarius/HUD.java @@ -1,4 +1,4 @@ -package bzh.fainsin.sagittarius; +package sagittarius; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.g2d.Batch; @@ -27,7 +27,7 @@ class HUD implements Disposable { // framerate font.draw(batch, frameRate + " fps", 3, Gdx.graphics.getHeight() - 3); - // cursor positions + // cursor positions, oui c'est dégueu font.draw(batch, "x_r = " + (int) SagittariusGame.screenCursor.x + ", y_r = " + (int) SagittariusGame.screenCursor.y, SagittariusGame.screenCursor.x + 5, Gdx.graphics.getHeight() - SagittariusGame.screenCursor.y + 5); font.draw(batch, "x_g = " + (int) SagittariusGame.worldCursor.x + ", y_g = " + (int) SagittariusGame.worldCursor.y, SagittariusGame.screenCursor.x + 5, Gdx.graphics.getHeight() - SagittariusGame.screenCursor.y + 20); diff --git a/core/src/bzh/fainsin/sagittarius/Planet.java b/core/src/sagittarius/Planet.java similarity index 96% rename from core/src/bzh/fainsin/sagittarius/Planet.java rename to core/src/sagittarius/Planet.java index 90b1235..aad98bb 100644 --- a/core/src/bzh/fainsin/sagittarius/Planet.java +++ b/core/src/sagittarius/Planet.java @@ -1,4 +1,4 @@ -package bzh.fainsin.sagittarius; +package sagittarius; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.Batch; diff --git a/core/src/bzh/fainsin/sagittarius/Player.java b/core/src/sagittarius/Player.java similarity index 98% rename from core/src/bzh/fainsin/sagittarius/Player.java rename to core/src/sagittarius/Player.java index 4327695..ad2500a 100644 --- a/core/src/bzh/fainsin/sagittarius/Player.java +++ b/core/src/sagittarius/Player.java @@ -1,4 +1,4 @@ -package bzh.fainsin.sagittarius; +package sagittarius; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input.Keys; diff --git a/core/src/bzh/fainsin/sagittarius/SagittariusGame.java b/core/src/sagittarius/SagittariusGame.java similarity index 97% rename from core/src/bzh/fainsin/sagittarius/SagittariusGame.java rename to core/src/sagittarius/SagittariusGame.java index 45bc68e..0aac0f5 100644 --- a/core/src/bzh/fainsin/sagittarius/SagittariusGame.java +++ b/core/src/sagittarius/SagittariusGame.java @@ -1,4 +1,4 @@ -package bzh.fainsin.sagittarius; +package sagittarius; import java.util.ArrayList; import java.util.Iterator; diff --git a/desktop/build.gradle b/desktop/build.gradle index 9587af5..1cf7925 100644 --- a/desktop/build.gradle +++ b/desktop/build.gradle @@ -2,7 +2,7 @@ sourceCompatibility = 1.15 sourceSets.main.java.srcDirs = [ "src/" ] sourceSets.main.resources.srcDirs = ["../core/assets"] -project.ext.mainClassName = "bzh.fainsin.sagittarius.desktop.DesktopLauncher" +project.ext.mainClassName = "sagittarius.desktop.DesktopLauncher" project.ext.assetsDir = new File("../core/assets") task run(dependsOn: classes, type: JavaExec) { diff --git a/desktop/src/bzh/fainsin/sagittarius/desktop/DesktopLauncher.java b/desktop/src/sagittarius/desktop/DesktopLauncher.java similarity index 84% rename from desktop/src/bzh/fainsin/sagittarius/desktop/DesktopLauncher.java rename to desktop/src/sagittarius/desktop/DesktopLauncher.java index 797b09f..ebc31a4 100644 --- a/desktop/src/bzh/fainsin/sagittarius/desktop/DesktopLauncher.java +++ b/desktop/src/sagittarius/desktop/DesktopLauncher.java @@ -1,8 +1,8 @@ -package bzh.fainsin.sagittarius.desktop; +package sagittarius.desktop; import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; -import bzh.fainsin.sagittarius.SagittariusGame; +import sagittarius.SagittariusGame; public class DesktopLauncher { public static void main(String[] arg) {