support window resizing correctly
This commit is contained in:
@ -116,6 +116,14 @@ class Game: ApplicationAdapter()
|
||||
suzanneInstance.transform = Matrix4().translate(3.0f, 1.0f, -3.5f)
|
||||
}
|
||||
|
||||
override fun resize(width: Int, height: Int)
|
||||
{
|
||||
colin.resize(width, height)
|
||||
spriteBatch.projectionMatrix.setToOrtho2D(0.0f, 0.0f,
|
||||
Gdx.graphics.getWidth().toFloat(),
|
||||
Gdx.graphics.getHeight().toFloat());
|
||||
}
|
||||
|
||||
private fun update(deltaTime: Float)
|
||||
{
|
||||
colin.update(deltaTime)
|
||||
|
Reference in New Issue
Block a user