mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 05:54:05 +09:00
asynch update and render (aka frameskip)
This commit is contained in:
@@ -34,7 +34,7 @@ class UIBasicNotifier(private val player: ActorHumanoid?) : UICanvas {
|
||||
ELuptimer += delta
|
||||
}
|
||||
|
||||
if (mouseUp || Gdx.input.isKeyPressed(TerrarumGDX.getConfigInt("keyinteract"))) {
|
||||
if (mouseUp || Gdx.input.isKeyPressed(Terrarum.getConfigInt("keyinteract"))) {
|
||||
ELuptimer = 0f
|
||||
ELon = true
|
||||
}
|
||||
@@ -94,11 +94,11 @@ class UIBasicNotifier(private val player: ActorHumanoid?) : UICanvas {
|
||||
if (player != null) {
|
||||
val playerPos = player.tilewiseHitbox
|
||||
lightLevel = (LightmapRenderer.getLight(playerPos.centeredX.toInt(), playerPos.centeredY.toInt()) ?:
|
||||
TerrarumGDX.ingame!!.world.globalLight
|
||||
Terrarum.ingame!!.world.globalLight
|
||||
).normaliseToColour()
|
||||
}
|
||||
else {
|
||||
lightLevel = TerrarumGDX.ingame!!.world.globalLight.normaliseToColour()
|
||||
lightLevel = Terrarum.ingame!!.world.globalLight.normaliseToColour()
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user