en blanco
This commit is contained in:
BIN
core/assets/badlogic.jpg
Normal file
BIN
core/assets/badlogic.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
6
core/build.gradle
Normal file
6
core/build.gradle
Normal file
@@ -0,0 +1,6 @@
|
||||
apply plugin: "java"
|
||||
|
||||
sourceCompatibility = 1.7
|
||||
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
||||
|
||||
sourceSets.main.java.srcDirs = [ "src/" ]
|
||||
33
core/src/com/mygdx/game/MyGdxGame.java
Normal file
33
core/src/com/mygdx/game/MyGdxGame.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package com.mygdx.game;
|
||||
|
||||
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 MyGdxGame 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(0, 0, 1, 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user