nat playground buggy z sorting

This commit is contained in:
2022-06-28 17:09:34 +00:00
parent 46becb3b63
commit 4413114218
3 changed files with 24 additions and 4 deletions

View File

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