Skip to content

Instantly share code, notes, and snippets.

/Game.kt Secret
Created Sep 14, 2014

Embed
What would you like to do?
override fun create(): Unit {
batch = SpriteBatch()
var viewport = FitViewport(600f, 800f, OrthographicCamera())
stage = Stage(viewport)
Textures.set("logo", TextureRegion(Texture("badlogic.jpg")))
stage.addActor(TestActor())
}
override fun resize(width: Int, height: Int) {
super.resize(width, height)
stage.getViewport()!!.update(width, height, false)
}
override fun render(): Unit {
stage.act()
Gdx.gl!!.glClear(GL20.GL_COLOR_BUFFER_BIT);
super.render()
stage.draw()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.