when defining position, remember old z

This commit is contained in:
2023-06-06 12:56:58 -06:00
parent 9b6b113078
commit 16a2cde7f1

View File

@@ -196,12 +196,13 @@
(method :Void defineStagePosition [:FlxCamera camera :StagePosition->Void submit &opt :StagePosition oldPos]
(let [db (new DebugLayer)]
(set db.cameras [camera])
(db.drawCircle oldPos.x oldPos.y 4 FlxColor.YELLOW 2)
(when oldPos
(db.drawCircle oldPos.x oldPos.y 4 FlxColor.YELLOW 2))
(FlxG.state.add db)
(defineFlxPoint
->point
{(FlxG.state.remove db)
(submit (new StagePosition point.x point.y 5.0))})))
(defineFlxPoint
->point
{(FlxG.state.remove db)
(submit (new StagePosition point.x point.y (or oldPos?.z 5.0)))})))
(method :Void defineLightSource [:FlxLightSource->Void submit]
(let [points []]