Sample LibGDX project setup
1
wizard-client/wizard-client-libgdx/core/build.gradle
Normal file
@@ -0,0 +1 @@
|
||||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
@@ -0,0 +1,31 @@
|
||||
package eu.jonahbauer.wizard.client.libgdx;
|
||||
|
||||
import com.badlogic.gdx.ApplicationAdapter;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||
import com.badlogic.gdx.utils.ScreenUtils;
|
||||
|
||||
public class MyGdxGame extends ApplicationAdapter {
|
||||
SpriteBatch batch;
|
||||
Texture img;
|
||||
|
||||
@Override
|
||||
public void create () {
|
||||
batch = new SpriteBatch();
|
||||
img = new Texture("badlogic.jpg");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render () {
|
||||
ScreenUtils.clear(1, 0, 0, 1);
|
||||
batch.begin();
|
||||
batch.draw(img, 0, 0);
|
||||
batch.end();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose () {
|
||||
batch.dispose();
|
||||
img.dispose();
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 128 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 135 KiB |
After Width: | Height: | Size: 3.1 MiB |
After Width: | Height: | Size: 264 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 40 KiB |