libDGX setup
This commit is contained in:
parent
c5ae4de37a
commit
18e54ffa75
13 changed files with 641 additions and 0 deletions
6
core/build.gradle
Normal file
6
core/build.gradle
Normal file
|
@ -0,0 +1,6 @@
|
|||
sourceCompatibility = 1.8
|
||||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
||||
|
||||
sourceSets.main.java.srcDirs = [ "src/" ]
|
||||
|
||||
eclipse.project.name = appName + "-core"
|
31
core/src/dev/bangbang/loom/Game.java
Normal file
31
core/src/dev/bangbang/loom/Game.java
Normal file
|
@ -0,0 +1,31 @@
|
|||
package dev.bangbang.loom;
|
||||
|
||||
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 Game 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();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue