Skip to content

Commit

Permalink
Little FlxBackdrop optimization (#394)
Browse files Browse the repository at this point in the history
* Update FlxBackdrop.hx

* Fix Typo

* Update flixel/addons/display/FlxBackdrop.hx

Co-authored-by: George Kurelic <[email protected]>

---------

Co-authored-by: George Kurelic <[email protected]>
  • Loading branch information
Sword352 and Geokureli authored Jun 26, 2023
1 parent dae67f5 commit c76c18d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flixel/addons/display/FlxBackdrop.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class FlxBackdrop extends FlxSprite
/**
* The gap between repeated tiles, defaults to (0, 0), or no gap.
*/
public var spacing(default, null):FlxPoint = new FlxPoint();
public var spacing(default, null):FlxPoint = FlxPoint.get();

/**
* If true, tiles are pre-rendered to a intermediary bitmap whenever `loadGraphic` is called
Expand Down Expand Up @@ -68,7 +68,7 @@ class FlxBackdrop extends FlxSprite
* Creates an instance of the FlxBackdrop class, used to create infinitely scrolling backgrounds.
*
* @param graphic The image you want to use for the backdrop.
* @param repeatAxes If the backdrop should repeat on the X axis.
* @param repeatAxes The axes on which to repeat. The default, `XY` will tile the entire camera.
* @param spacingX Amount of spacing between tiles on the X axis
* @param spacingY Amount of spacing between tiles on the Y axis
*/
Expand Down Expand Up @@ -569,4 +569,4 @@ typedef BackdropDrawParams = {
spacingY:Float,
repeatAxes:FlxAxes,
angle:Float
};
};

0 comments on commit c76c18d

Please sign in to comment.