CameraTools.copyBetter

This commit is contained in:
2025-12-09 14:11:40 -06:00
parent 91b70b97e0
commit 4c0c506f7b

View File

@@ -108,6 +108,14 @@
(set camera.scroll scrollPosition)))))
(otherwise null)))
(function copyBetter [:FlxCamera self :FlxCamera camera]
(self.copyFrom camera)
(set self.x camera.x)
(set self.y camera.y)
(self.scroll.set camera.scroll.x camera.scroll.y)
(set self.zoom camera.zoom)
self)
(function getScrollBounds [:FlxCamera camera]
(.fromTwoPoints (new FlxRect) (new FlxPoint camera.minScrollX camera.minScrollY) (new FlxPoint camera.maxScrollX camera.maxScrollY)))