fixed a bug where signal emitter wouldn't work after save reload

This commit is contained in:
minjaesong
2022-01-24 13:00:52 +09:00
parent ee8da4df84
commit a213cba5ef
6 changed files with 12 additions and 83 deletions

View File

@@ -30,7 +30,6 @@ class FixtureLogicSignalEmitter : FixtureBase, Electric {
}
CommonResourcePool.loadAll()
density = 1400.0
setHitboxDimension(TILE_SIZE, TILE_SIZE, 0, -1)
@@ -38,9 +37,14 @@ class FixtureLogicSignalEmitter : FixtureBase, Electric {
sprite!!.setRowsAndFrames(1, 1)
actorValue[AVKey.BASEMASS] = MASS
}
override fun update(delta: Float) {
// the values does not get preserved on save reload??
wireEmitterTypes["digital_bit"] = 0
wireEmission[0] = Vector2(1.0, 0.0)
super.update(delta)
}
override fun dispose() { }