parent
bdc85bf7ce
commit
e7874ef8db
@ -0,0 +1,33 @@
|
|||||||
|
package com.dungeoncrawler;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.ApplicationAdapter;
|
||||||
|
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 Grafik extends ApplicationAdapter {
|
||||||
|
SpriteBatch batch;
|
||||||
|
Texture img;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void create () {
|
||||||
|
batch = new SpriteBatch();
|
||||||
|
img = new Texture("badlogic.jpg");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render () {
|
||||||
|
Gdx.gl.glClearColor(1, 0, 0, 1);
|
||||||
|
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
|
||||||
|
batch.begin();
|
||||||
|
batch.draw(img, 0, 0);
|
||||||
|
batch.end();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dispose () {
|
||||||
|
batch.dispose();
|
||||||
|
img.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,33 +1,7 @@
|
|||||||
package com.dungeoncrawler;
|
package com.dungeoncrawler;
|
||||||
|
|
||||||
import com.badlogic.gdx.ApplicationAdapter;
|
import com.badlogic.gdx.ApplicationAdapter;
|
||||||
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 Main extends ApplicationAdapter {
|
public class Main extends ApplicationAdapter {
|
||||||
SpriteBatch batch;
|
|
||||||
Texture img;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void create () {
|
|
||||||
batch = new SpriteBatch();
|
|
||||||
img = new Texture("badlogic.jpg");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render () {
|
|
||||||
Gdx.gl.glClearColor(1, 0, 0, 1);
|
|
||||||
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
|
|
||||||
batch.begin();
|
|
||||||
batch.draw(img, 0, 0);
|
|
||||||
batch.end();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void dispose () {
|
|
||||||
batch.dispose();
|
|
||||||
img.dispose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in new issue