Added absGDX dependency
This commit is contained in:
parent
f590388454
commit
4d0366cc01
@ -60,6 +60,7 @@ project(":core") {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
|
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
|
||||||
|
compile files("lib/absGDX-framework-1.0.jar")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
core/lib/absGDX-framework-1.0-source.jar
Normal file
BIN
core/lib/absGDX-framework-1.0-source.jar
Normal file
Binary file not shown.
BIN
core/lib/absGDX-framework-1.0.jar
Normal file
BIN
core/lib/absGDX-framework-1.0.jar
Normal file
Binary file not shown.
@ -1,27 +1,18 @@
|
|||||||
package de.samdev.cannonshooter;
|
package de.samdev.cannonshooter;
|
||||||
|
|
||||||
import com.badlogic.gdx.ApplicationAdapter;
|
import de.samdev.absgdx.framework.AgdxGame;
|
||||||
import com.badlogic.gdx.Gdx;
|
|
||||||
import com.badlogic.gdx.graphics.GL20;
|
|
||||||
import com.badlogic.gdx.graphics.Texture;
|
|
||||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
|
||||||
|
|
||||||
public class CannonGame extends ApplicationAdapter {
|
public class CannonGame extends AgdxGame {
|
||||||
SpriteBatch batch;
|
|
||||||
Texture img;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void create () {
|
public void onCreate() {
|
||||||
batch = new SpriteBatch();
|
// TODO Auto-generated method stub
|
||||||
img = new Texture("badlogic.jpg");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render () {
|
public void onUpdate(float arg0) {
|
||||||
Gdx.gl.glClearColor(1, 0, 0, 1);
|
// TODO Auto-generated method stub
|
||||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
|
|
||||||
batch.begin();
|
|
||||||
batch.draw(img, 0, 0);
|
|
||||||
batch.end();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
6
core/src/de/samdev/cannonshooter/Textures.java
Normal file
6
core/src/de/samdev/cannonshooter/Textures.java
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
package de.samdev.cannonshooter;
|
||||||
|
|
||||||
|
public final class Textures {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -2,11 +2,17 @@ package de.samdev.cannonshooter.desktop;
|
|||||||
|
|
||||||
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
|
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
|
||||||
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
|
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
|
||||||
|
|
||||||
|
import de.samdev.absgdx.framework.util.AndroidResolutions;
|
||||||
import de.samdev.cannonshooter.CannonGame;
|
import de.samdev.cannonshooter.CannonGame;
|
||||||
|
|
||||||
public class DesktopLauncher {
|
public class DesktopLauncher {
|
||||||
public static void main (String[] arg) {
|
public static void main (String[] arg) {
|
||||||
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
|
LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
|
||||||
|
|
||||||
|
config.width = AndroidResolutions.RES__16_9.x;
|
||||||
|
config.height = AndroidResolutions.RES__16_9.y;
|
||||||
|
|
||||||
new LwjglApplication(new CannonGame(), config);
|
new LwjglApplication(new CannonGame(), config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user