issue #26 resolved (someone is hoolding stale ingame context)

This commit is contained in:
minjaesong
2019-07-03 03:59:37 +09:00
parent 42dbaaa242
commit ae8d7a67f2
27 changed files with 116 additions and 81 deletions

View File

@@ -317,7 +317,7 @@ class BuildingMaker(batch: SpriteBatch) : IngameInstance(batch) {
private var updateAkku = 0.0
override fun render(delta: Float) {
override fun render(updateRate: Float) {
Gdx.graphics.setTitle(TerrarumIngame.getCanonicalTitle())
@@ -327,9 +327,9 @@ class BuildingMaker(batch: SpriteBatch) : IngameInstance(batch) {
updateAkku += dt
var i = 0L
while (updateAkku >= delta) {
AppLoader.measureDebugTime("Ingame.update") { updateGame(delta) }
updateAkku -= delta
while (updateAkku >= updateRate) {
AppLoader.measureDebugTime("Ingame.update") { updateGame(updateRate) }
updateAkku -= updateRate
i += 1
}
AppLoader.setDebugTime("Ingame.updateCounter", i)