Begin adding support for rendering different shaped bricks

This commit is contained in:
2018-11-15 20:09:48 +04:00
parent 64e00c1a1a
commit f70dc67878
5 changed files with 113 additions and 17 deletions

View File

@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.utils.viewport.FitViewport;
@ -25,6 +26,7 @@ public class BrickBuster extends Game {
public BitmapFont font;
public SpriteBatch sb;
public ShapeRenderer sr;
public PolygonSpriteBatch pb;
@Override
public void create () {
@ -38,6 +40,7 @@ public class BrickBuster extends Game {
sb = new SpriteBatch();
sr = new ShapeRenderer();
pb = new PolygonSpriteBatch();
setScreen(new MenuState(this));
}
@ -56,6 +59,7 @@ public class BrickBuster extends Game {
sb.setProjectionMatrix(cam.combined);
sr.setProjectionMatrix(cam.combined);
pb.setProjectionMatrix(cam.combined);
super.resize(width, height);
}