update to littlekt 0.6.0

This commit is contained in:
LeHaine 2023-02-06 20:39:20 -05:00
parent 504cd11ea7
commit 005319343c
No known key found for this signature in database
GPG key ID: 8AEC4F9B9F33E9AC
2 changed files with 8 additions and 5 deletions

View file

@ -2,9 +2,12 @@ package com.game.template
import com.lehaine.littlekt.Context import com.lehaine.littlekt.Context
import com.lehaine.littlekt.ContextListener import com.lehaine.littlekt.ContextListener
import com.lehaine.littlekt.graphics.* import com.lehaine.littlekt.graphics.Color
import com.lehaine.littlekt.graphics.Fonts
import com.lehaine.littlekt.graphics.g2d.*
import com.lehaine.littlekt.graphics.g2d.shape.ShapeRenderer
import com.lehaine.littlekt.graphics.gl.ClearBufferMask import com.lehaine.littlekt.graphics.gl.ClearBufferMask
import com.lehaine.littlekt.graphics.shape.ShapeRenderer import com.lehaine.littlekt.graphics.toFloatBits
import com.lehaine.littlekt.math.geom.degrees import com.lehaine.littlekt.math.geom.degrees
import com.lehaine.littlekt.math.geom.radians import com.lehaine.littlekt.math.geom.radians
import com.lehaine.littlekt.util.viewport.ExtendViewport import com.lehaine.littlekt.util.viewport.ExtendViewport
@ -30,7 +33,7 @@ class Game(context: Context) : ContextListener(context) {
gl.clear(ClearBufferMask.COLOR_BUFFER_BIT) gl.clear(ClearBufferMask.COLOR_BUFFER_BIT)
batch.use(camera.viewProjection) { batch.use(camera.viewProjection) {
Fonts.default.draw(it, "Hello LittleKt!", 0f, 0f) Fonts.default.draw(it, "Hello LittleKt!", -15f, 0f)
shapeRenderer.filledRectangle(-25f, 50f, 100f, 50f, rotation, color = Color.RED.toFloatBits()) shapeRenderer.filledRectangle(-25f, 50f, 100f, 50f, rotation, color = Color.RED.toFloatBits())
} }
rotationTimer += dt rotationTimer += dt

View file

@ -1,11 +1,11 @@
[versions] [versions]
plugin-android = "7.2.2" plugin-android = "7.2.2"
plugin-kotlin = "1.7.20" plugin-kotlin = "1.8.10"
kotlinx-html = "0.7.2" kotlinx-html = "0.7.2"
kotlinx-coroutines = "1.6.4" kotlinx-coroutines = "1.6.4"
littlekt = "0.5.0" littlekt = "0.6.0"
[libraries] [libraries]
plugin-android = { module = "com.android.tools.build:gradle", version.ref = "plugin-android" } plugin-android = { module = "com.android.tools.build:gradle", version.ref = "plugin-android" }