CameraTools.copyBetter
This commit is contained in:
@@ -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)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user