libDGX setup

This commit is contained in:
chriscamarillo 2024-03-28 21:29:14 -04:00
parent c5ae4de37a
commit 18e54ffa75
13 changed files with 641 additions and 0 deletions

6
core/build.gradle Normal file
View file

@ -0,0 +1,6 @@
sourceCompatibility = 1.8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
sourceSets.main.java.srcDirs = [ "src/" ]
eclipse.project.name = appName + "-core"

View 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();
}
}