public setBounds ( float X, float Y, float Width, float Height, System.Boolean UpdateWorld = false ) : void | ||
X | float | |
Y | float | |
Width | float | |
Height | float | |
UpdateWorld | System.Boolean | |
return | void |
public void setBounds(float X = 0, float Y = 0, float Width = 0, float Height = 0, Boolean UpdateWorld = false)
{
if (bounds == null)
bounds = new FlxRect();
bounds.make(X, Y, Width, Height);
if (UpdateWorld)
FlxG.worldBounds.copyFrom(bounds);
update();
}
public void follow(FlxCamera Camera = null, int Border = 0, Boolean UpdateWorld = false) { if (Camera == null) { Camera = FlxG.camera; } Camera.setBounds(x + Border * tileSize, y + Border * tileSize, width - Border * tileSize * 2, height - Border * tileSize * 2, UpdateWorld); }