Skip to content

Commit

Permalink
honor FlxSprite.defaultAntiAliasing in FlxTilemap (#2688)
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli authored Nov 30, 2022
1 parent 781814e commit f81766d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions flixel/FlxSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class FlxSprite extends FlxObject
/**
* The default value for `antialiasing` across all `FlxSprites`,
* defaults to `false`.
* @since 5.0.0
*/
public static var defaultAntialiasing:Bool = false;

Expand All @@ -157,7 +158,7 @@ class FlxSprite extends FlxObject
/**
* Controls whether the object is smoothed when rotated, affects performance.
*/
public var antialiasing(default, set):Bool = false;
public var antialiasing(default, set):Bool = defaultAntialiasing;

/**
* Set this flag to true to force the sprite to update during the `draw()` call.
Expand Down Expand Up @@ -378,7 +379,6 @@ class FlxSprite extends FlxObject
super(X, Y);

useFramePixels = FlxG.renderBlit;
antialiasing = defaultAntialiasing;
if (SimpleGraphic != null)
loadGraphic(SimpleGraphic);
}
Expand Down
4 changes: 3 additions & 1 deletion flixel/tile/FlxTilemap.hx
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ class FlxTilemap extends FlxBaseTilemap<FlxTile>
/**
* Controls whether the object is smoothed when rotated, affects performance.
* @since 4.1.0
*
* @see FlxSprite.defaultAntialiasing
*/
public var antialiasing(default, set):Bool = false;
public var antialiasing(default, set):Bool = FlxSprite.defaultAntialiasing;

/**
* Use to offset the drawing position of the tilemap,
Expand Down

0 comments on commit f81766d

Please sign in to comment.