#12 event for world block change -- mainly meant for fixture updating itself

This commit is contained in:
minjaesong
2019-02-02 01:58:49 +09:00
parent 1e4e4d2b94
commit c476ca0d99
4 changed files with 96 additions and 2 deletions

View File

@@ -405,6 +405,8 @@ open class Ingame(batch: SpriteBatch) : IngameInstance(batch) {
itemOnGrip?.endSecondaryUse(delta)
}
private var firstTimeRun = true
///////////////
@@ -505,6 +507,12 @@ open class Ingame(batch: SpriteBatch) : IngameInstance(batch) {
CollisionSolver.process()
WorldCamera.update(gameworld, actorNowPlaying)
// completely consume block change queues because why not
terrainChangeQueue.clear()
wallChangeQueue.clear()
wireChangeQueue.clear()
}
@@ -665,6 +673,12 @@ open class Ingame(batch: SpriteBatch) : IngameInstance(batch) {
}
}
}
if (it is CuedByTerrainChange) {
terrainChangeQueue.forEach { cue ->
it.updateForWorldChange(cue)
}
}
}
}
actorNowPlaying?.update(delta)