Move savePosition() out of EntrySprite into PlaygroundSystem

This commit is contained in:
2023-02-15 05:47:26 -07:00
parent 1604387dc0
commit 3a21c8b687
2 changed files with 7 additions and 3 deletions

View File

@@ -83,9 +83,7 @@
(method savePos []
(FlxG.camera.extendScrollBounds this PlayState.SCROLL_BOUND_MARGIN)
(withWritableComponents archive e [positions Positions]
(let [pos (dictGet positions positionKey)]
(dictSet positions positionKey (object x (cast this.x Float) y (cast this.y Float) z pos.z)))))
(system.savePosition e (cast this.x Float) (cast this.y Float)))
(method &override :Void update [:Float elapsed]
(super.update elapsed)