From 3261557dc90f5b5c4ecac7f81181704ff0f6c33e Mon Sep 17 00:00:00 2001 From: Jeasonfire Date: Mon, 11 May 2015 14:01:54 +0300 Subject: [PATCH] Added font renderer. --- .gitignore | 1 + core/src/com/saltosion/gladiator/systems/RenderingSystem.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index a69bfd2..ea3b111 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,7 @@ nbdist/ nbactions.xml nb-configuration.xml .nb-gradle/ +.nb-gradle-properties ## Gradle diff --git a/core/src/com/saltosion/gladiator/systems/RenderingSystem.java b/core/src/com/saltosion/gladiator/systems/RenderingSystem.java index 27d9beb..0f2c6a1 100644 --- a/core/src/com/saltosion/gladiator/systems/RenderingSystem.java +++ b/core/src/com/saltosion/gladiator/systems/RenderingSystem.java @@ -10,6 +10,7 @@ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.OrthographicCamera; +import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.glutils.ShapeRenderer; @@ -26,6 +27,7 @@ public class RenderingSystem extends EntitySystem { private ImmutableArray entities; private SpriteBatch batch; + private BitmapFont font; private ShapeRenderer debugRenderer; private OrthographicCamera camera; @@ -38,6 +40,8 @@ public class RenderingSystem extends EntitySystem { updateEntities(engine); batch = new SpriteBatch(); + font = new BitmapFont(); + font.setScale(0.3f); debugRenderer = new ShapeRenderer(); camera = new OrthographicCamera(); camera.setToOrtho(false, 1, 1);