fix last commit

This commit is contained in:
2022-01-03 13:17:56 -07:00
parent 37be7bbc08
commit 9cc637fca4

View File

@@ -2,8 +2,8 @@
(function :Array<Int> positionOn [:FlxSprite stamp :FlxSprite canvas :RelativePosition pos] (function :Array<Int> positionOn [:FlxSprite stamp :FlxSprite canvas :RelativePosition pos]
(unless pos.anchorX (set pos.anchorX (Percent 0.5))) (unless pos.anchorX (set pos.anchorX (Percent 0.5)))
(unless pos.anchorY (set pos.anchorY (Percent 0.5))) (unless pos.anchorY (set pos.anchorY (Percent 0.5)))
(let [&mut x (coordIn pos.x (/ canvas.width canvas.scale.x)) (let [&mut x (coordIn pos.x (/ canvas.width canvas.scale.x) pos.offsetX)
&mut y (coordIn pos.y (/ canvas.height canvas.scale.y))] &mut y (coordIn pos.y (/ canvas.height canvas.scale.y) pos.offsetY)]
(-= x (coordIn pos.anchorX (/ stamp.width stamp.scale.x))) (-= x (coordIn pos.anchorX (/ stamp.width stamp.scale.x)))
(-= y (coordIn pos.anchorY (/ stamp.height stamp.scale.y))) (-= y (coordIn pos.anchorY (/ stamp.height stamp.scale.y)))
[x y])) [x y]))