mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 04:54:05 +09:00
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:
@@ -74,7 +74,12 @@ object IngameRenderer {
|
||||
uiListToDraw = uisToDraw
|
||||
}
|
||||
|
||||
init(world)
|
||||
init()
|
||||
|
||||
BlocksDrawer.world = world
|
||||
LightmapRenderer.setWorld(world)
|
||||
FeaturesDrawer.world = world
|
||||
|
||||
this.player = player
|
||||
|
||||
|
||||
@@ -389,7 +394,7 @@ object IngameRenderer {
|
||||
}
|
||||
|
||||
|
||||
private fun init(world: GameWorldExtension) {
|
||||
private fun init() {
|
||||
if (!initDone) {
|
||||
batch = SpriteBatch()
|
||||
camera = OrthographicCamera(widthf, heightf)
|
||||
@@ -402,11 +407,6 @@ object IngameRenderer {
|
||||
|
||||
initDone = true
|
||||
}
|
||||
|
||||
|
||||
BlocksDrawer.world = world
|
||||
LightmapRenderer.setWorld(world)
|
||||
FeaturesDrawer.world = world
|
||||
}
|
||||
|
||||
private fun clearBuffer() {
|
||||
|
||||
Reference in New Issue
Block a user