mirror of
https://github.com/Klagarge/PokeHES.git
synced 2024-11-30 04:33:27 +00:00
add version
This commit is contained in:
parent
c6b854948d
commit
c94e170a30
@ -4,6 +4,11 @@ import com.badlogic.gdx.math.Vector2;
|
|||||||
|
|
||||||
import Main.Settings;
|
import Main.Settings;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.0
|
||||||
|
*/
|
||||||
public class Enemy extends Character{
|
public class Enemy extends Character{
|
||||||
|
|
||||||
private String subject;
|
private String subject;
|
||||||
|
@ -11,6 +11,11 @@ import Main.PokeHES;
|
|||||||
import Main.Settings;
|
import Main.Settings;
|
||||||
import Screen.ScreenMap;
|
import Screen.ScreenMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.0
|
||||||
|
*/
|
||||||
public class Player extends Character{
|
public class Player extends Character{
|
||||||
|
|
||||||
private int xp = 0;
|
private int xp = 0;
|
||||||
|
@ -2,6 +2,11 @@ package Entity;
|
|||||||
|
|
||||||
import ch.hevs.gdx2d.lib.GdxGraphics;
|
import ch.hevs.gdx2d.lib.GdxGraphics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.0
|
||||||
|
*/
|
||||||
public class Stuff extends Entity{
|
public class Stuff extends Entity{
|
||||||
|
|
||||||
public Stuff(String name, int x, int y, String map) {
|
public Stuff(String name, int x, int y, String map) {
|
||||||
|
@ -4,6 +4,11 @@ import Entity.Enemy;
|
|||||||
import Entity.Player;
|
import Entity.Player;
|
||||||
import Text.TextEnemy;
|
import Text.TextEnemy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.2
|
||||||
|
*/
|
||||||
public class Battle {
|
public class Battle {
|
||||||
|
|
||||||
public Enemy e;
|
public Enemy e;
|
||||||
|
@ -15,6 +15,11 @@ import Screen.ScreenPlayer;
|
|||||||
import ch.hevs.gdx2d.desktop.PortableApplication;
|
import ch.hevs.gdx2d.desktop.PortableApplication;
|
||||||
import ch.hevs.gdx2d.lib.GdxGraphics;
|
import ch.hevs.gdx2d.lib.GdxGraphics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.2
|
||||||
|
*/
|
||||||
public class PokeHES extends PortableApplication {
|
public class PokeHES extends PortableApplication {
|
||||||
|
|
||||||
private ScreenPlayer sp;
|
private ScreenPlayer sp;
|
||||||
@ -48,7 +53,6 @@ public class PokeHES extends PortableApplication {
|
|||||||
sp.init();
|
sp.init();
|
||||||
controller.init();
|
controller.init();
|
||||||
|
|
||||||
enemies.add(new Enemy("Mudry", 5, 6, "21RI", 700, "informatique"));
|
|
||||||
// add player, create and add all enemies in entities
|
// add player, create and add all enemies in entities
|
||||||
entities.add((Entity) sp.p);
|
entities.add((Entity) sp.p);
|
||||||
enemies.add(new Enemy("gloeckner", 1, 7, "21N307", 600, "allemand"));
|
enemies.add(new Enemy("gloeckner", 1, 7, "21N307", 600, "allemand"));
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package Main;
|
package Main;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.0
|
||||||
|
*/
|
||||||
public class Settings {
|
public class Settings {
|
||||||
|
|
||||||
public static final boolean ANDROID = false;
|
public static final boolean ANDROID = false;
|
||||||
|
@ -2,6 +2,11 @@ package Screen;
|
|||||||
|
|
||||||
import ch.hevs.gdx2d.lib.ScreenManager;
|
import ch.hevs.gdx2d.lib.ScreenManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.0
|
||||||
|
*/
|
||||||
public class ManagerOfScreen extends ScreenManager{
|
public class ManagerOfScreen extends ScreenManager{
|
||||||
ManagerOfScreen(){
|
ManagerOfScreen(){
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,11 @@ import ch.hevs.gdx2d.components.bitmaps.BitmapImage;
|
|||||||
import ch.hevs.gdx2d.components.screen_management.RenderingScreen;
|
import ch.hevs.gdx2d.components.screen_management.RenderingScreen;
|
||||||
import ch.hevs.gdx2d.lib.GdxGraphics;
|
import ch.hevs.gdx2d.lib.GdxGraphics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.2
|
||||||
|
*/
|
||||||
public class ScreenBattle extends RenderingScreen{
|
public class ScreenBattle extends RenderingScreen{
|
||||||
|
|
||||||
private static int EDGE = 10;
|
private static int EDGE = 10;
|
||||||
|
@ -12,15 +12,20 @@ import Main.Settings;
|
|||||||
import ch.hevs.gdx2d.components.screen_management.RenderingScreen;
|
import ch.hevs.gdx2d.components.screen_management.RenderingScreen;
|
||||||
import ch.hevs.gdx2d.lib.GdxGraphics;
|
import ch.hevs.gdx2d.lib.GdxGraphics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.0
|
||||||
|
*/
|
||||||
public class ScreenEnd extends RenderingScreen{
|
public class ScreenEnd extends RenderingScreen{
|
||||||
|
|
||||||
private String textEnd = null;
|
private String textEnd = null;
|
||||||
private BitmapFont unbuntuRegularWhite;
|
private BitmapFont ubuntuRegularWhite;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInit() {
|
public void onInit() {
|
||||||
//generate a new font
|
//generate a new font
|
||||||
unbuntuRegularWhite = generateFont("font/Ubuntu-Regular.ttf", 30, Color.WHITE);
|
ubuntuRegularWhite = generateFont("font/Ubuntu-Regular.ttf", 30, Color.WHITE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,13 +35,13 @@ public class ScreenEnd extends RenderingScreen{
|
|||||||
g.clear(Color.BLACK);
|
g.clear(Color.BLACK);
|
||||||
|
|
||||||
//display the text
|
//display the text
|
||||||
if(textEnd != null) g.drawStringCentered(Settings.SIDE/2, textEnd, unbuntuRegularWhite);
|
if(textEnd != null) g.drawStringCentered(Settings.SIDE/2, textEnd, ubuntuRegularWhite);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
unbuntuRegularWhite.dispose();
|
ubuntuRegularWhite.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
//set a different text if the player win or loose
|
//set a different text if the player win or loose
|
||||||
|
@ -21,6 +21,11 @@ import Entity.Player;
|
|||||||
import ch.hevs.gdx2d.components.screen_management.RenderingScreen;
|
import ch.hevs.gdx2d.components.screen_management.RenderingScreen;
|
||||||
import ch.hevs.gdx2d.lib.GdxGraphics;
|
import ch.hevs.gdx2d.lib.GdxGraphics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.1
|
||||||
|
*/
|
||||||
public class ScreenMap extends RenderingScreen{
|
public class ScreenMap extends RenderingScreen{
|
||||||
|
|
||||||
// tiles management
|
// tiles management
|
||||||
|
@ -5,6 +5,11 @@ import Entity.Player;
|
|||||||
import Game.Battle;
|
import Game.Battle;
|
||||||
import ch.hevs.gdx2d.lib.GdxGraphics;
|
import ch.hevs.gdx2d.lib.GdxGraphics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.0
|
||||||
|
*/
|
||||||
public class ScreenPlayer {
|
public class ScreenPlayer {
|
||||||
public ManagerOfScreen screenManager = new ManagerOfScreen();
|
public ManagerOfScreen screenManager = new ManagerOfScreen();
|
||||||
public Player p = null;
|
public Player p = null;
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package Text;
|
package Text;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.0
|
||||||
|
*/
|
||||||
public class Attack {
|
public class Attack {
|
||||||
String attack;
|
String attack;
|
||||||
int currentAttack;
|
int currentAttack;
|
||||||
|
@ -6,6 +6,11 @@ import java.io.InputStreamReader;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.0
|
||||||
|
*/
|
||||||
public class FightData {
|
public class FightData {
|
||||||
|
|
||||||
private Vector<Attack> attacks = new Vector<Attack>();
|
private Vector<Attack> attacks = new Vector<Attack>();
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
package Text;
|
package Text;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.0
|
||||||
|
*/
|
||||||
public class Line {
|
public class Line {
|
||||||
public String line;
|
public String line;
|
||||||
public boolean attackOn;
|
public boolean attackOn;
|
||||||
|
@ -6,6 +6,11 @@ import java.io.InputStreamReader;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.0
|
||||||
|
*/
|
||||||
public class SpeechData {
|
public class SpeechData {
|
||||||
|
|
||||||
Vector<String> speechs = new Vector<String>();
|
Vector<String> speechs = new Vector<String>();
|
||||||
|
@ -5,6 +5,11 @@ import java.util.Vector;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Rémi Heredero
|
||||||
|
* @author Yann Sierro
|
||||||
|
* @version 1.0.2
|
||||||
|
*/
|
||||||
public class TextEnemy {
|
public class TextEnemy {
|
||||||
private static final int CUT = 55;
|
private static final int CUT = 55;
|
||||||
public FightData fightData;
|
public FightData fightData;
|
||||||
@ -73,6 +78,7 @@ public class TextEnemy {
|
|||||||
//generate the text who is displays in battle screen
|
//generate the text who is displays in battle screen
|
||||||
public void generateText(int cursor){
|
public void generateText(int cursor){
|
||||||
lines.clear();
|
lines.clear();
|
||||||
|
currentData.clear();
|
||||||
int i =1;
|
int i =1;
|
||||||
|
|
||||||
//introduction line
|
//introduction line
|
||||||
@ -111,12 +117,10 @@ public class TextEnemy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//display answer
|
//display answer
|
||||||
/*
|
System.out.println("----------");
|
||||||
for(int[] a : currentData){
|
for(int[] a : currentData){
|
||||||
System.out.println(Arrays.toString(a));
|
System.out.println(Arrays.toString(a));
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
//finish (win and death)
|
//finish (win and death)
|
||||||
String dead = formatLine(speechData.getSpeechs(5),CUT);
|
String dead = formatLine(speechData.getSpeechs(5),CUT);
|
||||||
|
Loading…
Reference in New Issue
Block a user