diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/build.gradle | 15 | ||||
| -rw-r--r-- | core/src/main/java/coffee/liz/dyl/FirstScreen.java | 45 | ||||
| -rw-r--r-- | core/src/main/java/coffee/liz/dyl/Main.java | 11 |
3 files changed, 71 insertions, 0 deletions
diff --git a/core/build.gradle b/core/build.gradle new file mode 100644 index 0000000..a27dcd6 --- /dev/null +++ b/core/build.gradle @@ -0,0 +1,15 @@ +[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' +eclipse.project.name = appName + '-core' + +dependencies { + api "com.badlogicgames.ashley:ashley:$ashleyVersion" + api "com.badlogicgames.box2dlights:box2dlights:$box2dlightsVersion" + api "com.badlogicgames.gdx:gdx-ai:$aiVersion" + api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" + api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion" + api "com.badlogicgames.gdx:gdx:$gdxVersion" + + if(enableGraalNative == 'true') { + implementation "io.github.berstanio:gdx-svmhelper-annotations:$graalHelperVersion" + } +} diff --git a/core/src/main/java/coffee/liz/dyl/FirstScreen.java b/core/src/main/java/coffee/liz/dyl/FirstScreen.java new file mode 100644 index 0000000..4901283 --- /dev/null +++ b/core/src/main/java/coffee/liz/dyl/FirstScreen.java @@ -0,0 +1,45 @@ +package coffee.liz.dyl; + +import com.badlogic.gdx.Screen; + +/** First screen of the application. Displayed after the application is created. */ +public class FirstScreen implements Screen { + @Override + public void show() { + // Prepare your screen here. + } + + @Override + public void render(float delta) { + // Draw your screen here. "delta" is the time since last render in seconds. + } + + @Override + public void resize(int width, int height) { + // If the window is minimized on a desktop (LWJGL3) platform, width and height are 0, which causes problems. + // In that case, we don't resize anything, and wait for the window to be a normal size before updating. + if(width <= 0 || height <= 0) return; + + // Resize your screen here. The parameters represent the new window size. + } + + @Override + public void pause() { + // Invoked when your application is paused. + } + + @Override + public void resume() { + // Invoked when your application is resumed after pause. + } + + @Override + public void hide() { + // This method is called when another screen replaces this one. + } + + @Override + public void dispose() { + // Destroy screen's assets here. + } +}
\ No newline at end of file diff --git a/core/src/main/java/coffee/liz/dyl/Main.java b/core/src/main/java/coffee/liz/dyl/Main.java new file mode 100644 index 0000000..24fa3de --- /dev/null +++ b/core/src/main/java/coffee/liz/dyl/Main.java @@ -0,0 +1,11 @@ +package coffee.liz.dyl; + +import com.badlogic.gdx.Game; + +/** {@link com.badlogic.gdx.ApplicationListener} implementation shared by all platforms. */ +public class Main extends Game { + @Override + public void create() { + setScreen(new FirstScreen()); + } +}
\ No newline at end of file |
