Begin adding support for rendering different shaped bricks
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user