mirror of
https://github.com/Klagarge/PokeHES.git
synced 2025-10-30 11:19:17 +00:00
avancée sur la base de donnée des attaques et discours
This commit is contained in:
@@ -1,30 +1,44 @@
|
||||
package Screen;
|
||||
|
||||
import Main.Settings;
|
||||
|
||||
import ch.hevs.gdx2d.components.screen_management.RenderingScreen;
|
||||
import ch.hevs.gdx2d.lib.GdxGraphics;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
|
||||
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.FreeTypeFontParameter;
|
||||
|
||||
import Control.Controller;
|
||||
import Entity.Enemy;
|
||||
|
||||
public class ScreenBattle extends RenderingScreen{
|
||||
|
||||
private static int EDGE = 10;
|
||||
private static int HEIGHT_DIALOG = Settings.SIDE / 3;
|
||||
private static int WIDTH_DIALOG = Settings.SIDE - 2*EDGE;
|
||||
|
||||
private boolean attackOn;
|
||||
|
||||
|
||||
private BitmapFont optimus40;
|
||||
|
||||
@Override
|
||||
public void onInit() {
|
||||
|
||||
//display the question
|
||||
generateFont("resources//font//OptimusPrinceps.ttf", optimus40, 100, Color.WHITE);
|
||||
generateFont("resources//font//OptimusPrinceps.ttf", optimus40, 20, Color.BLACK);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGraphicRender(GdxGraphics g) {
|
||||
g.clear(Color.GREEN);
|
||||
g.drawStringCentered(g.getScreenHeight()/2, "question", optimus40);
|
||||
g.clear(Color.BLACK);
|
||||
g.drawStringCentered(g.getScreenHeight()/2, "attack", optimus40);
|
||||
g.drawFilledRectangle(Settings.SIDE/2, HEIGHT_DIALOG/2 + EDGE, WIDTH_DIALOG, HEIGHT_DIALOG, 0);
|
||||
|
||||
}
|
||||
|
||||
@@ -44,6 +58,24 @@ public class ScreenBattle extends RenderingScreen{
|
||||
generator.dispose();
|
||||
|
||||
}
|
||||
|
||||
public void displayEnemy(Enemy e){
|
||||
if(e.textEnemy.attackOn){
|
||||
attackOn = true;
|
||||
}
|
||||
else()
|
||||
}
|
||||
|
||||
public void readNextLine(){
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void manage(Controller c){
|
||||
if (c.keyStatus.get(Input.Keys.SPACE)){
|
||||
readNextLine();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user