From bae3543a0b569a093169dcb0bd8df786ee1c45fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Fri, 17 Jun 2022 09:21:07 +0200 Subject: [PATCH 1/2] comments done --- src/Main/PokeMudry.java | 2 +- src/Screen/ManagerOfScreen.java | 12 ++++++++++++ src/Screen/ScreenMap.java | 7 ++++++- src/Screen/ScreenPlayer.java | 4 +--- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/Main/PokeMudry.java b/src/Main/PokeMudry.java index 5d1a03b..b638e19 100644 --- a/src/Main/PokeMudry.java +++ b/src/Main/PokeMudry.java @@ -69,7 +69,7 @@ public class PokeMudry extends PortableApplication { boolean onEndScreen = sp.screenManager.getActiveScreen().getClass().equals(ScreenEnd.class); long timeNow = System.currentTimeMillis(); - if((timeNow-lastMesure) >= 1000 && !onEndScreen){ // one second + if((timeNow-lastMesure) >= 1000 && !onEndScreen){ // one second during the game lastMesure = timeNow; sp.p.removedPv(1); for (Enemy enemy : enemies) { enemy.recoveredTime++; } diff --git a/src/Screen/ManagerOfScreen.java b/src/Screen/ManagerOfScreen.java index a63e4b0..dc4b3b5 100644 --- a/src/Screen/ManagerOfScreen.java +++ b/src/Screen/ManagerOfScreen.java @@ -6,16 +6,28 @@ public class ManagerOfScreen extends ScreenManager{ ManagerOfScreen(){ } + /** + * Get the current screen map + * @return the current screen map + */ public ScreenMap getScreenMap(){ this.activateScreen(0); return (ScreenMap)this.getActiveScreen(); } + /** + * Get the current screen battle + * @return the current screen battle + */ public ScreenBattle getScreenBattle(){ this.activateScreen(1); return (ScreenBattle)this.getActiveScreen(); } + /** + * Get the current end screen + * @return the current end screen + */ public ScreenEnd getScreenEnd(){ this.activateScreen(2); return (ScreenEnd) this.getActiveScreen(); diff --git a/src/Screen/ScreenMap.java b/src/Screen/ScreenMap.java index 69719fb..2d9e037 100644 --- a/src/Screen/ScreenMap.java +++ b/src/Screen/ScreenMap.java @@ -47,7 +47,7 @@ public class ScreenMap extends RenderingScreen{ try { map = player.getMap(); } catch (Exception e) {} - // create map + // create all map createMap("test"); createMap("test_couloir"); createMap("desert"); @@ -150,6 +150,11 @@ public class ScreenMap extends RenderingScreen{ return speed; } + /** + * Check if the position is a door and if yes, get and save all settings for change map + * @param position The position to be tested + * @return true if it's a door + */ public boolean isDoor(Vector2 position) { if (doors == null) return false; boolean onDoor = false; diff --git a/src/Screen/ScreenPlayer.java b/src/Screen/ScreenPlayer.java index 0569276..b5c6a05 100644 --- a/src/Screen/ScreenPlayer.java +++ b/src/Screen/ScreenPlayer.java @@ -17,10 +17,9 @@ public class ScreenPlayer { public void init(){ // One player by ScreenPlayer - //p = new Player(8, 15, "desert"); p = new Player(4, 2, "21RI"); - e = new Enemy("enemy", 0, 0, "desert", 50, "enemy"); + e = new Enemy("enemy", 0, 0, "21RI", 50, "enemy"); b = new Battle(e); // Create both type of screen and record for reuse @@ -31,7 +30,6 @@ public class ScreenPlayer { se = screenManager.getScreenEnd(); sm = screenManager.getScreenMap(); - } public void render(GdxGraphics g){ From 805910b1b94bf44c10ac71aeec75584cdd6cbc2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Fri, 17 Jun 2022 10:07:10 +0200 Subject: [PATCH 2/2] correct german --- Data/Battle/Fight/allemand.csv | 2 +- src/Game/Battle.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Data/Battle/Fight/allemand.csv b/Data/Battle/Fight/allemand.csv index 8b71165..3329e76 100644 --- a/Data/Battle/Fight/allemand.csv +++ b/Data/Battle/Fight/allemand.csv @@ -1,5 +1,5 @@ Traduisez < constituant > : ;verfassunggebend;belastend;zerstorant;Bestandteil;100 Traduisez < Jugendanimationankundigung > : ;l'annonce d'animation des jeunes;la prestation de la jeunesse;l'annonce de la jeunesse;l'annonce d'animation jeunesse;100 Accordez : < Er hat blau... Augen. >;Er hat blaue Augen.;Er hat blau Augen.;Er hat blauen Augen.;Er hat blauer Augen;100 -Conjuguez < absetzen > (Plusquamperfekt) 2p. Pl. : ;wir hatten abgesetzt;wir hatten abgesetzt;du hast abgesetzt;Du sitz;175 +Conjuguez < absetzen > (Plusquamperfekt) 2p. Pl. : ;ihr hatten abgesetzt;wir hatten abgesetzt;du hast abgesetzt;ihr sitz;175 Conjuger: Er ein Kind. (Prasens);Er umfahrt ein Kind;Er fahrt ein Kind um;Er umfahre ein Kind;Er fahre ein Kind um;125 diff --git a/src/Game/Battle.java b/src/Game/Battle.java index f036101..679c5af 100644 --- a/src/Game/Battle.java +++ b/src/Game/Battle.java @@ -18,7 +18,7 @@ public class Battle { public int xpPlayer; public boolean screenBattleOn = true; - + public Battle(Enemy e){ if(e != null){ textEnemy = new TextEnemy(e);