abolished a need to pass world as parametre

+ simply changing the single variable (ingame.world) will update all the renderer's behaviour
+ somehow my git changelogs are exploding
This commit is contained in:
minjaesong
2018-10-05 23:40:03 +09:00
parent ae1e99aa3e
commit 397b2a8795
36 changed files with 344 additions and 268 deletions

View File

@@ -9,6 +9,7 @@ import net.torvald.terrarum.worlddrawer.LightmapRenderer
import net.torvald.terrarum.worlddrawer.FeaturesDrawer
import net.torvald.terrarum.Terrarum.mouseTileX
import net.torvald.terrarum.Terrarum.mouseTileY
import net.torvald.terrarum.gameworld.GameWorld
import net.torvald.terrarum.modulebasegame.Ingame
import net.torvald.terrarum.modulebasegame.gameworld.GameWorldExtension
@@ -29,7 +30,10 @@ class BasicDebugInfoWindow : UICanvas() {
private var ydelta = 0.0
private val ingame = Terrarum.ingame!! as Ingame
private val world = ingame.world as GameWorldExtension
private val world: GameWorldExtension
get() = Terrarum.ingame!!.world as GameWorldExtension
override fun updateUI(delta: Float) {
val player = ingame.actorNowPlaying