Files
CodenameEngine/source/funkin/editors/ui/UIUtil.hx
T
2023-03-15 21:52:42 +01:00

9 lines
319 B
Haxe

package funkin.editors.ui;
class UIUtil {
public static inline function follow(spr:FlxSprite, target:FlxSprite, x:Float = 0, y:Float = 0) {
spr.cameras = target.cameras;
spr.setPosition(target.x + x, target.y + y);
spr.scrollFactor.set(target.scrollFactor.x, target.scrollFactor.y);
}
}