diff --git a/Data/img/Image_prof/Informatique.xcf b/Data/img/Image_prof/Informatique.xcf deleted file mode 100644 index 58db420..0000000 Binary files a/Data/img/Image_prof/Informatique.xcf and /dev/null differ diff --git a/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 040 Wigglytuff.png b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 040 Wigglytuff.png new file mode 100644 index 0000000..354acd7 Binary files /dev/null and b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 040 Wigglytuff.png differ diff --git a/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 063 Abra.png b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 063 Abra.png new file mode 100644 index 0000000..ed3787b Binary files /dev/null and b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 063 Abra.png differ diff --git a/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 066 Machop.png b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 066 Machop.png new file mode 100644 index 0000000..3823445 Binary files /dev/null and b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 066 Machop.png differ diff --git a/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 067 Machoke.png b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 067 Machoke.png new file mode 100644 index 0000000..4bbfed5 Binary files /dev/null and b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 067 Machoke.png differ diff --git a/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 096 Drowzee.png b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 096 Drowzee.png new file mode 100644 index 0000000..cfc4cae Binary files /dev/null and b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 096 Drowzee.png differ diff --git a/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 125 Electabuzz.png b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 125 Electabuzz.png new file mode 100644 index 0000000..3b8ba1f Binary files /dev/null and b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 125 Electabuzz.png differ diff --git a/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 132 Ditto.png b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 132 Ditto.png new file mode 100644 index 0000000..fe40a9c Binary files /dev/null and b/Data/img/fichiers_de_travail/Custom Edited - Pokemon Generation 1 Customs - 132 Ditto.png differ diff --git a/Data/img/Image_prof/Player.xcf b/Data/img/fichiers_de_travail/Player.xcf similarity index 100% rename from Data/img/Image_prof/Player.xcf rename to Data/img/fichiers_de_travail/Player.xcf diff --git a/Data/img/fichiers_de_travail/branche/allemand.xcf b/Data/img/fichiers_de_travail/branche/allemand.xcf new file mode 100644 index 0000000..b25c448 Binary files /dev/null and b/Data/img/fichiers_de_travail/branche/allemand.xcf differ diff --git a/Data/img/fichiers_de_travail/branche/electricite.xcf b/Data/img/fichiers_de_travail/branche/electricite.xcf new file mode 100644 index 0000000..7ab347d Binary files /dev/null and b/Data/img/fichiers_de_travail/branche/electricite.xcf differ diff --git a/Data/img/fichiers_de_travail/branche/informatique.xcf b/Data/img/fichiers_de_travail/branche/informatique.xcf new file mode 100644 index 0000000..d3f1fa5 Binary files /dev/null and b/Data/img/fichiers_de_travail/branche/informatique.xcf differ diff --git a/Data/img/fichiers_de_travail/branche/math.xcf b/Data/img/fichiers_de_travail/branche/math.xcf new file mode 100644 index 0000000..e57824c Binary files /dev/null and b/Data/img/fichiers_de_travail/branche/math.xcf differ diff --git a/Data/img/fichiers_de_travail/branche/mecanique.xcf b/Data/img/fichiers_de_travail/branche/mecanique.xcf new file mode 100644 index 0000000..3e5b79a Binary files /dev/null and b/Data/img/fichiers_de_travail/branche/mecanique.xcf differ diff --git a/Data/img/fichiers_de_travail/branche/physique.xcf b/Data/img/fichiers_de_travail/branche/physique.xcf new file mode 100644 index 0000000..7148ebb Binary files /dev/null and b/Data/img/fichiers_de_travail/branche/physique.xcf differ diff --git a/Data/img/liste professeur.txt b/Data/img/fichiers_de_travail/liste professeur.txt similarity index 100% rename from Data/img/liste professeur.txt rename to Data/img/fichiers_de_travail/liste professeur.txt diff --git a/Data/img/Image_prof/Bezencon.xcf b/Data/img/fichiers_de_travail/prof/Bezencon.xcf similarity index 100% rename from Data/img/Image_prof/Bezencon.xcf rename to Data/img/fichiers_de_travail/prof/Bezencon.xcf diff --git a/Data/img/Image_prof/Bezençon Cyrille.jpg b/Data/img/fichiers_de_travail/prof/Bezençon Cyrille.jpg similarity index 100% rename from Data/img/Image_prof/Bezençon Cyrille.jpg rename to Data/img/fichiers_de_travail/prof/Bezençon Cyrille.jpg diff --git a/Data/img/Image_prof/Bianchi Christophe.jpg b/Data/img/fichiers_de_travail/prof/Bianchi Christophe.jpg similarity index 100% rename from Data/img/Image_prof/Bianchi Christophe.jpg rename to Data/img/fichiers_de_travail/prof/Bianchi Christophe.jpg diff --git a/Data/img/Image_prof/Bianchi.xcf b/Data/img/fichiers_de_travail/prof/Bianchi.xcf similarity index 100% rename from Data/img/Image_prof/Bianchi.xcf rename to Data/img/fichiers_de_travail/prof/Bianchi.xcf diff --git a/Data/img/Image_prof/Collab5118197931.jpg b/Data/img/fichiers_de_travail/prof/Collab5118197931.jpg similarity index 100% rename from Data/img/Image_prof/Collab5118197931.jpg rename to Data/img/fichiers_de_travail/prof/Collab5118197931.jpg diff --git a/Data/img/Image_prof/Davide Pavanello.jpg b/Data/img/fichiers_de_travail/prof/Davide Pavanello.jpg similarity index 100% rename from Data/img/Image_prof/Davide Pavanello.jpg rename to Data/img/fichiers_de_travail/prof/Davide Pavanello.jpg diff --git a/Data/img/Image_prof/Ellert Christoph.jpg b/Data/img/fichiers_de_travail/prof/Ellert Christoph.jpg similarity index 100% rename from Data/img/Image_prof/Ellert Christoph.jpg rename to Data/img/fichiers_de_travail/prof/Ellert Christoph.jpg diff --git a/Data/img/Image_prof/Ellert.xcf b/Data/img/fichiers_de_travail/prof/Ellert.xcf similarity index 100% rename from Data/img/Image_prof/Ellert.xcf rename to Data/img/fichiers_de_travail/prof/Ellert.xcf diff --git a/Data/img/Image_prof/Epiney Jacques.jpg b/Data/img/fichiers_de_travail/prof/Epiney Jacques.jpg similarity index 100% rename from Data/img/Image_prof/Epiney Jacques.jpg rename to Data/img/fichiers_de_travail/prof/Epiney Jacques.jpg diff --git a/Data/img/Image_prof/Epiney.xcf b/Data/img/fichiers_de_travail/prof/Epiney.xcf similarity index 100% rename from Data/img/Image_prof/Epiney.xcf rename to Data/img/fichiers_de_travail/prof/Epiney.xcf diff --git a/Data/img/Image_prof/Evequoz.xcf b/Data/img/fichiers_de_travail/prof/Evequoz.xcf similarity index 100% rename from Data/img/Image_prof/Evequoz.xcf rename to Data/img/fichiers_de_travail/prof/Evequoz.xcf diff --git a/Data/img/Image_prof/Evéquoz Gilles.jpg b/Data/img/fichiers_de_travail/prof/Evéquoz Gilles.jpg similarity index 100% rename from Data/img/Image_prof/Evéquoz Gilles.jpg rename to Data/img/fichiers_de_travail/prof/Evéquoz Gilles.jpg diff --git a/Data/img/Image_prof/Gloeckner Caroline.jpg b/Data/img/fichiers_de_travail/prof/Gloeckner Caroline.jpg similarity index 100% rename from Data/img/Image_prof/Gloeckner Caroline.jpg rename to Data/img/fichiers_de_travail/prof/Gloeckner Caroline.jpg diff --git a/Data/img/Image_prof/Gloeckner.xcf b/Data/img/fichiers_de_travail/prof/Gloeckner.xcf similarity index 100% rename from Data/img/Image_prof/Gloeckner.xcf rename to Data/img/fichiers_de_travail/prof/Gloeckner.xcf diff --git a/Data/img/Image_prof/Haifa Sallem.jpg b/Data/img/fichiers_de_travail/prof/Haifa Sallem.jpg similarity index 100% rename from Data/img/Image_prof/Haifa Sallem.jpg rename to Data/img/fichiers_de_travail/prof/Haifa Sallem.jpg diff --git a/Data/img/Image_prof/Laffargue-Rieder Laurence.jpg b/Data/img/fichiers_de_travail/prof/Laffargue-Rieder Laurence.jpg similarity index 100% rename from Data/img/Image_prof/Laffargue-Rieder Laurence.jpg rename to Data/img/fichiers_de_travail/prof/Laffargue-Rieder Laurence.jpg diff --git a/Data/img/Image_prof/Laffargue-Rieder.xcf b/Data/img/fichiers_de_travail/prof/Laffargue-Rieder.xcf similarity index 100% rename from Data/img/Image_prof/Laffargue-Rieder.xcf rename to Data/img/fichiers_de_travail/prof/Laffargue-Rieder.xcf diff --git a/Data/img/Image_prof/Mudry Pierre-André.jpg b/Data/img/fichiers_de_travail/prof/Mudry Pierre-André.jpg similarity index 100% rename from Data/img/Image_prof/Mudry Pierre-André.jpg rename to Data/img/fichiers_de_travail/prof/Mudry Pierre-André.jpg diff --git a/Data/img/Image_prof/Mudry.xcf b/Data/img/fichiers_de_travail/prof/Mudry.xcf similarity index 100% rename from Data/img/Image_prof/Mudry.xcf rename to Data/img/fichiers_de_travail/prof/Mudry.xcf diff --git a/Data/img/Image_prof/Nicollier Grégoire.jpg b/Data/img/fichiers_de_travail/prof/Nicollier Grégoire.jpg similarity index 100% rename from Data/img/Image_prof/Nicollier Grégoire.jpg rename to Data/img/fichiers_de_travail/prof/Nicollier Grégoire.jpg diff --git a/Data/img/Image_prof/Nicollier.xcf b/Data/img/fichiers_de_travail/prof/Nicollier.xcf similarity index 100% rename from Data/img/Image_prof/Nicollier.xcf rename to Data/img/fichiers_de_travail/prof/Nicollier.xcf diff --git a/Data/img/Image_prof/Paciotti Gabriel.jpg b/Data/img/fichiers_de_travail/prof/Paciotti Gabriel.jpg similarity index 100% rename from Data/img/Image_prof/Paciotti Gabriel.jpg rename to Data/img/fichiers_de_travail/prof/Paciotti Gabriel.jpg diff --git a/Data/img/Paciotti.xcf b/Data/img/fichiers_de_travail/prof/Paciotti.xcf similarity index 100% rename from Data/img/Paciotti.xcf rename to Data/img/fichiers_de_travail/prof/Paciotti.xcf diff --git a/Data/img/Image_prof/Pavanello.xcf b/Data/img/fichiers_de_travail/prof/Pavanello.xcf similarity index 100% rename from Data/img/Image_prof/Pavanello.xcf rename to Data/img/fichiers_de_travail/prof/Pavanello.xcf diff --git a/Data/img/Image_prof/Rapillard Laurent.jpg b/Data/img/fichiers_de_travail/prof/Rapillard Laurent.jpg similarity index 100% rename from Data/img/Image_prof/Rapillard Laurent.jpg rename to Data/img/fichiers_de_travail/prof/Rapillard Laurent.jpg diff --git a/Data/img/Image_prof/Rapillard.xcf b/Data/img/fichiers_de_travail/prof/Rapillard.xcf similarity index 100% rename from Data/img/Image_prof/Rapillard.xcf rename to Data/img/fichiers_de_travail/prof/Rapillard.xcf diff --git a/Data/img/Image_prof/Rey-Mermet.xcf b/Data/img/fichiers_de_travail/prof/Rey-Mermet.xcf similarity index 100% rename from Data/img/Image_prof/Rey-Mermet.xcf rename to Data/img/fichiers_de_travail/prof/Rey-Mermet.xcf diff --git a/Data/img/Image_prof/Sallem.xcf b/Data/img/fichiers_de_travail/prof/Sallem.xcf similarity index 100% rename from Data/img/Image_prof/Sallem.xcf rename to Data/img/fichiers_de_travail/prof/Sallem.xcf diff --git a/Data/img/Image_prof/Samuel Rey-Mermet.jpg b/Data/img/fichiers_de_travail/prof/Samuel Rey-Mermet.jpg similarity index 100% rename from Data/img/Image_prof/Samuel Rey-Mermet.jpg rename to Data/img/fichiers_de_travail/prof/Samuel Rey-Mermet.jpg diff --git a/Data/img/Image_prof/Savioz Christian.jpg b/Data/img/fichiers_de_travail/prof/Savioz Christian.jpg similarity index 100% rename from Data/img/Image_prof/Savioz Christian.jpg rename to Data/img/fichiers_de_travail/prof/Savioz Christian.jpg diff --git a/Data/img/Image_prof/Savioz.xcf b/Data/img/fichiers_de_travail/prof/Savioz.xcf similarity index 100% rename from Data/img/Image_prof/Savioz.xcf rename to Data/img/fichiers_de_travail/prof/Savioz.xcf diff --git a/Data/img/Image_prof/Wittmann Christian.jpg b/Data/img/fichiers_de_travail/prof/Wittmann Christian.jpg similarity index 100% rename from Data/img/Image_prof/Wittmann Christian.jpg rename to Data/img/fichiers_de_travail/prof/Wittmann Christian.jpg diff --git a/Data/img/Image_prof/Wittmann.xcf b/Data/img/fichiers_de_travail/prof/Wittmann.xcf similarity index 100% rename from Data/img/Image_prof/Wittmann.xcf rename to Data/img/fichiers_de_travail/prof/Wittmann.xcf diff --git a/Data/img/fichiers_de_travail/sacha.png b/Data/img/fichiers_de_travail/sacha.png new file mode 100644 index 0000000..83846db Binary files /dev/null and b/Data/img/fichiers_de_travail/sacha.png differ diff --git a/Data/img/fichiers_de_travail/sacha_sprite.png b/Data/img/fichiers_de_travail/sacha_sprite.png new file mode 100644 index 0000000..49e01a2 Binary files /dev/null and b/Data/img/fichiers_de_travail/sacha_sprite.png differ diff --git a/Data/img/sprite_flipper.py b/Data/img/fichiers_de_travail/sprite_flipper.py similarity index 100% rename from Data/img/sprite_flipper.py rename to Data/img/fichiers_de_travail/sprite_flipper.py diff --git a/Data/img/Bianchi.png b/Data/img/person/Bianchi.png similarity index 100% rename from Data/img/Bianchi.png rename to Data/img/person/Bianchi.png diff --git a/Data/img/Ellert.png b/Data/img/person/Ellert.png similarity index 100% rename from Data/img/Ellert.png rename to Data/img/person/Ellert.png diff --git a/Data/img/Gloeckner.png b/Data/img/person/Gloeckner.png similarity index 100% rename from Data/img/Gloeckner.png rename to Data/img/person/Gloeckner.png diff --git a/Data/img/Mudry.png b/Data/img/person/Mudry.png similarity index 100% rename from Data/img/Mudry.png rename to Data/img/person/Mudry.png diff --git a/Data/img/Nicollier.png b/Data/img/person/Nicollier.png similarity index 100% rename from Data/img/Nicollier.png rename to Data/img/person/Nicollier.png diff --git a/Data/img/Paciotti.png b/Data/img/person/Paciotti.png similarity index 100% rename from Data/img/Paciotti.png rename to Data/img/person/Paciotti.png diff --git a/Data/img/Player.png b/Data/img/person/Player.png similarity index 100% rename from Data/img/Player.png rename to Data/img/person/Player.png diff --git a/Data/img/enemy.png b/Data/img/person/enemy.png similarity index 100% rename from Data/img/enemy.png rename to Data/img/person/enemy.png diff --git a/Data/img/Character.png b/Data/img/sprite/Character.png similarity index 100% rename from Data/img/Character.png rename to Data/img/sprite/Character.png diff --git a/Data/img/Character_flipped.png b/Data/img/sprite/Character_flipped.png similarity index 100% rename from Data/img/Character_flipped.png rename to Data/img/sprite/Character_flipped.png diff --git a/Data/img/sprite/allemand.png b/Data/img/sprite/allemand.png new file mode 100644 index 0000000..9630564 Binary files /dev/null and b/Data/img/sprite/allemand.png differ diff --git a/Data/img/sprite/electricite.png b/Data/img/sprite/electricite.png new file mode 100644 index 0000000..1f2786b Binary files /dev/null and b/Data/img/sprite/electricite.png differ diff --git a/Data/img/lumberjack_sheet32.png b/Data/img/sprite/ennemy.png similarity index 100% rename from Data/img/lumberjack_sheet32.png rename to Data/img/sprite/ennemy.png diff --git a/Data/img/sprite/informatique.png b/Data/img/sprite/informatique.png new file mode 100644 index 0000000..de7919d Binary files /dev/null and b/Data/img/sprite/informatique.png differ diff --git a/Data/img/sprite/mathematique.png b/Data/img/sprite/mathematique.png new file mode 100644 index 0000000..e2beb11 Binary files /dev/null and b/Data/img/sprite/mathematique.png differ diff --git a/Data/img/sprite/mecanique.png b/Data/img/sprite/mecanique.png new file mode 100644 index 0000000..f6e5dee Binary files /dev/null and b/Data/img/sprite/mecanique.png differ diff --git a/Data/img/sprite/physique.png b/Data/img/sprite/physique.png new file mode 100644 index 0000000..bc6a7f6 Binary files /dev/null and b/Data/img/sprite/physique.png differ diff --git a/Data/img/sprite/sprite_sacha.png b/Data/img/sprite/sprite_sacha.png new file mode 100644 index 0000000..2baa4ea Binary files /dev/null and b/Data/img/sprite/sprite_sacha.png differ diff --git a/src/Entity/Character.java b/src/Entity/Character.java index e439828..998c655 100644 --- a/src/Entity/Character.java +++ b/src/Entity/Character.java @@ -21,13 +21,13 @@ public abstract class Character extends Entity{ * The currently selected sprite for animation */ int textureX = 0; - int textureY = 1; + int textureY = 0; float speed = 1; float dt = 0; int currentFrame = 0; int nFrames = 4; - final float FRAME_TIME = 0.1f; // Duration of each frime + final float FRAME_TIME = 0.1f; // Duration of each frame private String img; private String imgBattle; @@ -45,13 +45,13 @@ public abstract class Character extends Entity{ super(name, x, y, map); this.img = img; - imgBattle = "./Data/img/" + name + ".png"; + imgBattle = "./Data/img/person/" + name + ".png"; } @Override public void init() { super.init(); - ss = new Spritesheet("./Data/img/" + img + ".png", SPRITE_WIDTH, SPRITE_HEIGHT); + ss = new Spritesheet("./Data/img/sprite/" + img + ".png", SPRITE_WIDTH, SPRITE_HEIGHT); } @Override @@ -140,10 +140,10 @@ public abstract class Character extends Entity{ textureY = 2; break; case LEFT: - textureY = 3; + textureY = 1; break; case UP: - textureY = 1; + textureY = 3; break; case DOWN: textureY = 0; diff --git a/src/Entity/Enemy.java b/src/Entity/Enemy.java index d9b08f0..4e2b323 100644 --- a/src/Entity/Enemy.java +++ b/src/Entity/Enemy.java @@ -11,15 +11,13 @@ public class Enemy extends Character{ private int pvInit; - public Enemy(String name, int x, int y, String img, String map, int pv, String branch, Character.Direction dir) { + public Enemy(String name, int x, int y, String map, int pv, String branch) { - super(name, x, y, img, map); + super(name, x, y, branch, map); //generate his text this.map = map; - turn(dir); - this.branch = branch; this.pv = pv; diff --git a/src/Entity/Player.java b/src/Entity/Player.java index 856b614..5c2b878 100644 --- a/src/Entity/Player.java +++ b/src/Entity/Player.java @@ -19,7 +19,7 @@ public class Player extends Character{ private static final int XP_MAX = 6000; public Player(int x, int y, String map) { - super("Player", x, y, "Character_flipped", map); + super("Player", x, y, "sprite_sacha", map); //Character_flipped this.pv = Settings.TIME*60; } @@ -70,7 +70,7 @@ public class Player extends Character{ turn(goalDirection); System.out.println("It's a enemy !!"); } else { - setSpeed(sm.getSpeed(nextCell)); //TODO remove x3 + setSpeed(sm.getSpeed(nextCell)*1.5f); go(goalDirection); } } else { @@ -81,7 +81,7 @@ public class Player extends Character{ if(onDoor){ long time = System.currentTimeMillis(); - while (System.currentTimeMillis()-time < Settings.SWITCHMAPTIME) { } + while (System.currentTimeMillis()-time < Settings.SWITCH_MAP_TIME) { } String nMap = null; Integer x = null; Integer y = null; @@ -94,7 +94,7 @@ public class Player extends Character{ ScreenMap.Door.reset(); if (nMap == null || x == null || y == null) return; map = nMap; - if(map.equals("FabLab")) addXp(400); // * Like an easter egg, but necessary for win the game + if(map.equals("FabLab")) addXp(400); // * Like an Easter egg, but necessary for win the game setPosition(x*sm.tileWidth, y*sm.tileHeight); turn(goalDirection); System.out.println("Go to: " + map + " in " + x + " x " + y); diff --git a/src/Game/Battle.java b/src/Game/Battle.java index 246f3b2..f036101 100644 --- a/src/Game/Battle.java +++ b/src/Game/Battle.java @@ -76,10 +76,10 @@ public class Battle { String answerPlayer = textEnemy.fightData.getAttack(currentAttack).getAnswer(currentAnswer); //get true answer - String trueAsnwer = textEnemy.fightData.getAttack(currentAttack).getTrueAnswer(); + String trueAnswer = textEnemy.fightData.getAttack(currentAttack).getTrueAnswer(); //check the choice of the player - if(answerPlayer == trueAsnwer){ + if(answerPlayer == trueAnswer){ newXp += textEnemy.fightData.getAttack(currentAttack).getXp(); updatePlayerEnemy(textEnemy.fightData.getAttack(currentAttack).getXp()); System.out.println("it's true !!!!"); @@ -102,12 +102,12 @@ public class Battle { public void FinishSpeech(){ if(pvEnemy>0){ - //alive (speechline = 6) + //alive (speechLine = 6) lineSpeech = 6; System.out.println("enemy alive"); } else{ - //dead (speechline = 5) + //dead (speechLine = 5) lineSpeech = 5; System.out.println("enemy dead"); } diff --git a/src/Main/PokeMudry.java b/src/Main/PokeMudry.java index 63813a4..5f78937 100644 --- a/src/Main/PokeMudry.java +++ b/src/Main/PokeMudry.java @@ -3,7 +3,6 @@ package Main; import java.util.Vector; import Control.Controller; -import Entity.Character.Direction; import Entity.Enemy; import Entity.Entity; import Game.Battle; @@ -47,12 +46,12 @@ public class PokeMudry extends PortableApplication { // add player, create and add all enemies in entities entities.add((Entity) sp.p); - enemies.add(new Enemy("Gloeckner", 1, 7, "lumberjack_sheet32", "21N307", 600, "allemand", Direction.RIGHT)); - enemies.add(new Enemy("Nicollier", 4, 2, "lumberjack_sheet32", "21N308", 1600, "mathematique", Direction.LEFT)); - enemies.add(new Enemy("Mudry", 5, 11, "lumberjack_sheet32", "21N304", 700, "informatique", Direction.DOWN)); - enemies.add(new Enemy("Ellert", 1, 4, "lumberjack_sheet32", "23N215", 300, "physique", Direction.RIGHT)); - enemies.add(new Enemy("Bianchi", 1, 3, "lumberjack_sheet32", "23N308", 1200, "electricite", Direction.RIGHT)); - enemies.add(new Enemy("Paciotti", 5, 11, "lumberjack_sheet32", "21N205", 1200, "mecanique", Direction.DOWN)); + enemies.add(new Enemy("Gloeckner", 1, 7, "21N307", 600, "allemand")); + enemies.add(new Enemy("Nicollier", 4, 2, "21N308", 1600, "mathematique")); + enemies.add(new Enemy("Mudry", 5, 11, "21N304", 700, "informatique")); + enemies.add(new Enemy("Ellert", 1, 4, "23N215", 300, "physique")); + enemies.add(new Enemy("Bianchi", 1, 3, "23N308", 1200, "electricite")); + enemies.add(new Enemy("Paciotti", 5, 11, "21N205", 1200, "mecanique")); for (Enemy enemy : enemies) { entities.add(enemy); } //Init all entities diff --git a/src/Main/Settings.java b/src/Main/Settings.java index 0c89c76..32b03ee 100644 --- a/src/Main/Settings.java +++ b/src/Main/Settings.java @@ -6,7 +6,7 @@ public class Settings { public static final int PLAYERS = 1; public static final int TIME = 10; // number of minutes for kill all enemy // should be 10 public static final int RECOVERED = 30; // number of seconds an enemy need for recovered - public static final int SWITCHMAPTIME = 250; // Number of milliseconds the player wait for switch map + public static final int SWITCH_MAP_TIME = 250; // Number of milliseconds the player wait for switch map public static final int SIDE = 800; diff --git a/src/Screen/ScreenBattle.java b/src/Screen/ScreenBattle.java index c03d240..8080f66 100644 --- a/src/Screen/ScreenBattle.java +++ b/src/Screen/ScreenBattle.java @@ -23,8 +23,8 @@ public class ScreenBattle extends RenderingScreen{ private static int HEIGHT_DIALOG = Settings.SIDE / 3; private static int WIDTH_DIALOG = Settings.SIDE - 2*EDGE; - private BitmapFont unbuntuRegularBlack; - private BitmapFont unbuntuRegularWhite; + private BitmapFont ubuntuRegularBlack; + private BitmapFont ubuntuRegularWhite; private BitmapImage enemyImg; private BitmapImage playerImg; @@ -34,8 +34,8 @@ public class ScreenBattle extends RenderingScreen{ @Override public void onInit() { //display the question - unbuntuRegularBlack = generateFont("./Data/font/Ubuntu-Regular.ttf", 30, Color.BLACK); - unbuntuRegularWhite = generateFont("./Data/font/Ubuntu-Regular.ttf", 45, Color.WHITE); + ubuntuRegularBlack = generateFont("./Data/font/Ubuntu-Regular.ttf", 30, Color.BLACK); + ubuntuRegularWhite = generateFont("./Data/font/Ubuntu-Regular.ttf", 45, Color.WHITE); } @@ -49,8 +49,8 @@ public class ScreenBattle extends RenderingScreen{ @Override public void dispose() { - unbuntuRegularBlack.dispose(); - unbuntuRegularWhite.dispose(); + ubuntuRegularBlack.dispose(); + ubuntuRegularWhite.dispose(); } public void setImg(){ @@ -84,7 +84,7 @@ public class ScreenBattle extends RenderingScreen{ //dialog if(b == null) return; if(b.getLine() == null) return; - g.drawString(15, 260, b.getLine(), unbuntuRegularBlack); + g.drawString(15, 260, b.getLine(), ubuntuRegularBlack); } @@ -93,7 +93,7 @@ public class ScreenBattle extends RenderingScreen{ //draw image g.drawPicture(Settings.SIDE - (192/2), Settings.SIDE-240/2, enemyImg); //draw pv - g.drawString(300, Settings.SIDE - 15 , "PV : " + b.pvEnemy + " / " + b.e.getPvInit(), unbuntuRegularWhite); + g.drawString(300, Settings.SIDE - 15 , "PV : " + b.pvEnemy + " / " + b.e.getPvInit(), ubuntuRegularWhite); } @@ -103,7 +103,7 @@ public class ScreenBattle extends RenderingScreen{ g.drawPicture((192/2), HEIGHT_DIALOG + 10 + 240/2, playerImg); //draw pv - g.drawString(255, HEIGHT_DIALOG + 100 , "XP : " + b.xpPlayer + " / " + b.player.getXpMax() + "\nPV : " + b.player.getPv() + " / " + Settings.TIME*60, unbuntuRegularWhite); + g.drawString(255, HEIGHT_DIALOG + 100 , "XP : " + b.xpPlayer + " / " + b.player.getXpMax() + "\nPV : " + b.player.getPv() + " / " + Settings.TIME*60, ubuntuRegularWhite); } diff --git a/src/Screen/ScreenPlayer.java b/src/Screen/ScreenPlayer.java index 828eacf..0569276 100644 --- a/src/Screen/ScreenPlayer.java +++ b/src/Screen/ScreenPlayer.java @@ -2,7 +2,6 @@ package Screen; import Entity.Enemy; import Entity.Player; -import Entity.Character.Direction; import Game.Battle; import ch.hevs.gdx2d.lib.GdxGraphics; @@ -21,7 +20,7 @@ public class ScreenPlayer { //p = new Player(8, 15, "desert"); p = new Player(4, 2, "21RI"); - e = new Enemy("enemy", 0, 0, "lumberjack_sheet32", "desert", 50, "enemy",Direction.NULL); + e = new Enemy("enemy", 0, 0, "desert", 50, "enemy"); b = new Battle(e); // Create both type of screen and record for reuse diff --git a/src/Text/FightData.java b/src/Text/FightData.java index 90e66a8..181f693 100644 --- a/src/Text/FightData.java +++ b/src/Text/FightData.java @@ -14,7 +14,7 @@ public class FightData { - public int nbre_line =0; + public int nbr_line =0; public FightData(String branch) { file = new File("./Data/Battle/Fight/" + branch + ".csv"); @@ -37,7 +37,7 @@ public class FightData { attacks.add(attack); line = bf.readLine(); //add line - nbre_line++; + nbr_line++; } bf.close(); diff --git a/src/Text/TextEnemy.java b/src/Text/TextEnemy.java index fa4406c..35fb27b 100644 --- a/src/Text/TextEnemy.java +++ b/src/Text/TextEnemy.java @@ -1,8 +1,6 @@ package Text; import Entity.Enemy; -import Entity.Character.Direction; - import java.util.Vector; import java.util.Arrays; import java.util.Random; @@ -18,16 +16,6 @@ public class TextEnemy { private int[] orderAnswer; private Vector currentData; - - public static void main(String[] args) { - TextEnemy t = new TextEnemy(new Enemy("Mudry", 10, 15, "lumberjack_sheet32", "desert", 25, "informatique", Direction.NULL)); - - t.generateText(); - - for(Line l : t.lines) { - System.out.println(l.line); - } - } public TextEnemy(Enemy e){ //generate the vector of fight @@ -38,12 +26,12 @@ public class TextEnemy { speechData = new SpeechData(e.getName()); speechData.readFile(); - //save random data (attack and ansver) : attack, answer 1, answer 2 answer 3, answer 4 + //save random data (attack and answer) : attack, answer 1, answer 2 answer 3, answer 4 currentData = new Vector(); } - public static int[] randomGenerate( int min, int max, int nbreRandom){ + public static int[] randomGenerate( int min, int max, int nbrRandom){ //create an array with all the number I need int[] a = new int[max-min+1]; int k = min; @@ -53,7 +41,7 @@ public class TextEnemy { } //create a new array with the numbers I want - int[] b = new int[nbreRandom]; + int[] b = new int[nbrRandom]; // Creating object for Random class Random rd = new Random(); @@ -70,7 +58,7 @@ public class TextEnemy { a[j] = temp; } //add the numbers I want - for(int i=0;iline.length()-1){ newLine =line; @@ -151,35 +139,35 @@ public class TextEnemy { while(true){ - for(int i =stoppC; i>=startC; i--){ + for(int i =stopC; i>=startC; i--){ if(c[i] == ' '){ - stoppC = i; + stopC = i; break; } - else if(stoppC == c.length-1){ + else if(stopC == c.length-1){ break; } } //découper le mot - for(int i=startC;i<=stoppC;i++){ + for(int i=startC;i<=stopC;i++){ cutLine += c[i]; } newLine += cutLine+"\n"; cutLine = ""; - startC = stoppC + 1; + startC = stopC + 1; - if(c.length-1-stoppC <=0){ + if(c.length-1-stopC <=0){ break; } - else if(c.length-1-stoppC <= cut){ - stoppC = c.length-1; + else if(c.length-1-stopC <= cut){ + stopC = c.length-1; } else{ - stoppC += cut; + stopC += cut; } } }