diff --git a/.vscode/settings.json b/.vscode/settings.json index e112a70..58c0223 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,6 @@ "java.project.outputPath": "bin", "java.project.referencedLibraries": [ "lib/**/*.jar" - ] + ], + "java.configuration.updateBuildConfiguration": "interactive" } diff --git a/bin/Control/Controller.class b/bin/Control/Controller.class new file mode 100644 index 0000000..2183412 Binary files /dev/null and b/bin/Control/Controller.class differ diff --git a/bin/Entity/Character$Direction.class b/bin/Entity/Character$Direction.class new file mode 100644 index 0000000..15c6cba Binary files /dev/null and b/bin/Entity/Character$Direction.class differ diff --git a/bin/Entity/Character.class b/bin/Entity/Character.class index 02b1e72..3375e72 100644 Binary files a/bin/Entity/Character.class and b/bin/Entity/Character.class differ diff --git a/bin/Entity/Enemy.class b/bin/Entity/Enemy.class index 68f86ae..875d03d 100644 Binary files a/bin/Entity/Enemy.class and b/bin/Entity/Enemy.class differ diff --git a/bin/Entity/Entity.class b/bin/Entity/Entity.class index b7a8f9e..127a99a 100644 Binary files a/bin/Entity/Entity.class and b/bin/Entity/Entity.class differ diff --git a/bin/Entity/Player.class b/bin/Entity/Player.class index 0408b7a..33a7f94 100644 Binary files a/bin/Entity/Player.class and b/bin/Entity/Player.class differ diff --git a/bin/Entity/Stuff.class b/bin/Entity/Stuff.class index 5b389fe..3ad3de8 100644 Binary files a/bin/Entity/Stuff.class and b/bin/Entity/Stuff.class differ diff --git a/bin/Screen/ScreenBattle.class b/bin/Screen/ScreenBattle.class index 04a2c2c..50dd8e6 100644 Binary files a/bin/Screen/ScreenBattle.class and b/bin/Screen/ScreenBattle.class differ diff --git a/bin/Screen/ScreenMap$Door.class b/bin/Screen/ScreenMap$Door.class index 86696ed..415433e 100644 Binary files a/bin/Screen/ScreenMap$Door.class and b/bin/Screen/ScreenMap$Door.class differ diff --git a/bin/Screen/ScreenMap.class b/bin/Screen/ScreenMap.class index 61fb66b..6d9713b 100644 Binary files a/bin/Screen/ScreenMap.class and b/bin/Screen/ScreenMap.class differ diff --git a/bin/testHER.class b/bin/testHER.class index e6c891d..e75eec4 100644 Binary files a/bin/testHER.class and b/bin/testHER.class differ diff --git a/bin/testYann.class b/bin/testYann.class new file mode 100644 index 0000000..e57a007 Binary files /dev/null and b/bin/testYann.class differ diff --git a/resources/font/OptimusPrinceps.ttf b/resources/font/OptimusPrinceps.ttf new file mode 100644 index 0000000..e11017f Binary files /dev/null and b/resources/font/OptimusPrinceps.ttf differ diff --git a/resources/font/RobotoSlab-Regular.ttf b/resources/font/RobotoSlab-Regular.ttf new file mode 100644 index 0000000..eb52a79 Binary files /dev/null and b/resources/font/RobotoSlab-Regular.ttf differ diff --git a/resources/font/Starjedi.ttf b/resources/font/Starjedi.ttf new file mode 100644 index 0000000..2ac5bb1 Binary files /dev/null and b/resources/font/Starjedi.ttf differ diff --git a/resources/font/Timeless.ttf b/resources/font/Timeless.ttf new file mode 100644 index 0000000..0876626 Binary files /dev/null and b/resources/font/Timeless.ttf differ diff --git a/resources/font/ice_pixel-7.ttf b/resources/font/ice_pixel-7.ttf new file mode 100644 index 0000000..b447fca Binary files /dev/null and b/resources/font/ice_pixel-7.ttf differ diff --git a/src/Screen/ScreenBattle.java b/src/Screen/ScreenBattle.java index a4ac024..436c294 100644 --- a/src/Screen/ScreenBattle.java +++ b/src/Screen/ScreenBattle.java @@ -1,5 +1,57 @@ package Screen; -public class ScreenBattle { +import ch.hevs.gdx2d.components.screen_management.RenderingScreen; +import ch.hevs.gdx2d.desktop.PortableApplication; +import ch.hevs.gdx2d.lib.GdxGraphics; + +import java.io.File; + +import com.badlogic.gdx.Gdx; +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.FreeType.Bitmap; +import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.FreeTypeFontParameter; +import com.badlogic.gdx.utils.Align; + +public class ScreenBattle extends RenderingScreen{ + + private BitmapFont optimus40; + + @Override + public void onInit() { + + //display the question + generateFont("resources//font//OptimusPrinceps.ttf", optimus40, 100, Color.WHITE); + + } + + @Override + public void onGraphicRender(GdxGraphics g) { + g.clear(Color.GREEN); + g.drawStringCentered(g.getScreenHeight()/2, "question", optimus40); + + } + + @Override + public void dispose() { + optimus40.dispose(); + + } + + public void generateFont(String file, BitmapFont bitmapFont, int height, Color c ){ + FileHandle fileHandle = Gdx.files.internal(file); + FreeTypeFontParameter parameter = new FreeTypeFontParameter(); + FreeTypeFontGenerator generator = new FreeTypeFontGenerator(fileHandle); + parameter.size = generator.scaleForPixelHeight(height); + parameter.color = c; + optimus40 = generator.generateFont(parameter); + generator.dispose(); + + } + + + } diff --git a/src/testYann.java b/src/testYann.java new file mode 100644 index 0000000..a99d05a --- /dev/null +++ b/src/testYann.java @@ -0,0 +1,47 @@ + +import Screen.ScreenBattle; +import ch.hevs.gdx2d.desktop.PortableApplication; +import ch.hevs.gdx2d.lib.GdxGraphics; +import ch.hevs.gdx2d.lib.ScreenManager; + +public class testYann extends PortableApplication{ + + private ScreenManager s = new ScreenManager(); + + ScreenBattle b; + + public static void main(String[] args) { + new testYann(); + + } + + testYann(){ + super(1000, 800); + } + + @Override + public void onInit() { + b = new ScreenBattle(); + s.registerScreen(b.getClass()); + } + + @Override + public void onGraphicRender(GdxGraphics g) { + s.render(g); + + } + + + + @Override + public void onKeyDown(int keycode) { + // TODO Auto-generated method stub + super.onKeyDown(keycode); + } + @Override + public void onKeyUp(int keycode) { + // TODO Auto-generated method stub + super.onKeyUp(keycode); + } + +}