2015-04-08 15:59:01 +02:00
|
|
|
package com.saltosion.gladiator;
|
|
|
|
|
2015-04-08 18:19:14 +02:00
|
|
|
import com.badlogic.ashley.core.Engine;
|
2015-04-08 15:59:01 +02:00
|
|
|
import com.badlogic.gdx.ApplicationAdapter;
|
|
|
|
import com.badlogic.gdx.Gdx;
|
|
|
|
import com.badlogic.gdx.graphics.GL20;
|
2015-04-08 18:19:14 +02:00
|
|
|
import com.badlogic.gdx.graphics.OrthographicCamera;
|
2015-04-08 15:59:01 +02:00
|
|
|
import com.badlogic.gdx.graphics.Texture;
|
2015-04-08 18:19:14 +02:00
|
|
|
import com.badlogic.gdx.graphics.g2d.Batch;
|
|
|
|
import com.badlogic.gdx.graphics.g2d.Sprite;
|
2015-04-08 15:59:01 +02:00
|
|
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
2015-04-08 18:19:14 +02:00
|
|
|
import com.saltosion.gladiator.util.GlobalStrings;
|
|
|
|
import com.saltosion.gladiator.util.SpriteLoader;
|
2015-04-08 15:59:01 +02:00
|
|
|
|
|
|
|
public class GladiatorBrawler extends ApplicationAdapter {
|
2015-04-08 18:19:14 +02:00
|
|
|
|
|
|
|
private Batch batch;
|
|
|
|
private Sprite staticplayer;
|
|
|
|
private OrthographicCamera camera;
|
|
|
|
private Engine engine;
|
2015-04-08 15:59:01 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void create () {
|
2015-04-08 18:19:14 +02:00
|
|
|
engine = new Engine();
|
|
|
|
|
|
|
|
camera = new OrthographicCamera();
|
|
|
|
camera.setToOrtho(false, 384, 216);
|
2015-04-08 15:59:01 +02:00
|
|
|
batch = new SpriteBatch();
|
2015-04-08 18:19:14 +02:00
|
|
|
staticplayer = SpriteLoader.loadSprite(GlobalStrings.STATICPLAYER);
|
2015-04-08 15:59:01 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void render () {
|
2015-04-08 18:19:14 +02:00
|
|
|
Gdx.gl.glClearColor(1, 1, 1, 1);
|
2015-04-08 15:59:01 +02:00
|
|
|
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
|
2015-04-08 18:19:14 +02:00
|
|
|
batch.setProjectionMatrix(camera.combined);
|
2015-04-08 15:59:01 +02:00
|
|
|
batch.begin();
|
2015-04-08 18:19:14 +02:00
|
|
|
batch.draw(staticplayer, 0, 0);
|
2015-04-08 15:59:01 +02:00
|
|
|
batch.end();
|
|
|
|
}
|
|
|
|
}
|