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 5641910036
commit 83fd44df4c
36 changed files with 344 additions and 268 deletions

View File

@@ -8,7 +8,6 @@ import net.torvald.terrarum.IngameInstance
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.blockproperties.Block
import net.torvald.terrarum.gameactors.*
import net.torvald.terrarum.gameworld.GameWorld
import net.torvald.terrarum.modulebasegame.gameactors.ActorHumanoid
import net.torvald.terrarum.modulebasegame.gameworld.GameWorldExtension
import net.torvald.terrarum.modulebasegame.ui.Notification
@@ -46,7 +45,7 @@ class BuildingMaker(batch: SpriteBatch) : IngameInstance(batch) {
}
override var actorNowPlaying: ActorHumanoid? = MovableWorldCamera(world)
override var actorNowPlaying: ActorHumanoid? = MovableWorldCamera()
val uiToolbox = UIBuildingMakerToolbox()
val notifier = Notification()
@@ -170,7 +169,7 @@ class BuildingMaker(batch: SpriteBatch) : IngameInstance(batch) {
}
class MovableWorldCamera(world: GameWorld) : ActorHumanoid(world, 0, usePhysics = false) {
class MovableWorldCamera : ActorHumanoid(0, usePhysics = false) {
init {
referenceID = Terrarum.PLAYER_REF_ID