#MARIO VS HOOKERS (the game)
1 messages · Page 1 of 1 (latest)
Basically this entire game:
hi
wsg
decided to put functions in maps
thought it'd make things a little more organized
?
i cooked w/ these offsets
i am awesome
there are 3 functions for this
public static function resizeWindow(width:Int, height:Int)
{
var windowPos:FlxPoint = getCenterWindowPoint();
Lib.application.window.resize(width, height);
centerWindowOnPoint(windowPos);
}
public static inline function centerWindowOnPoint(?point:FlxPoint)
{
Lib.application.window.x = Std.int(point.x - (Lib.application.window.width / 2));
Lib.application.window.y = Std.int(point.y - (Lib.application.window.height / 2));
}
public static inline function getCenterWindowPoint():FlxPoint
return FlxPoint.get(Lib.application.window.x + (Lib.application.window.width / 2), Lib.application.window.y + (Lib.application.window.height / 2));
have em all