Created
September 17, 2014 17:17
-
-
Save cobolfoo/fe310b25f540e90fd703 to your computer and use it in GitHub Desktop.
Render between batches using scene2d actor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Matrix4 camera = stage.getCamera().combined; | |
Actor customActor = new Actor() { | |
@Override | |
public void draw (Batch batch, float parentAlpha) { | |
batch.end(); | |
shapeRenderer.setProjectionMatrix(camera); | |
shapeRenderer.begin(ShapeType.Line); | |
shapeRenderer.setColor(1, 1, 0, 1); | |
shapeRenderer.line(1, 1, 100, 100); | |
shapeRenderer.end(); | |
batch.begin(); | |
} | |
}; | |
stage.addActor(customActor); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment