Skip to content

Commit

Permalink
fix deprec (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli authored Jun 14, 2024
1 parent 4ec75fe commit f76d8b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion flixel/addons/effects/FlxTrail.hx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ class FlxTrail extends #if (flixel < "5.7.0") FlxSpriteGroup #else FlxSpriteCont
function cacheValue<T>(array:Array<T>, value:T)
{
array.unshift(value);
FlxArrayUtil.setLength(array, _trailLength);
if (array.length > _trailLength)
array.resize(_trailLength);
}

public function resetTrail():Void
Expand Down
6 changes: 3 additions & 3 deletions flixel/addons/nape/FlxNapeTilemap.hx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class FlxNapeTilemap extends FlxTilemap
{
super.loadMapFromCSV(MapData, TileGraphic, TileWidth, TileHeight, AutoTile, StartingIndex, DrawIndex, CollideIndex);
_binaryData = new Array<Int>();
FlxArrayUtil.setLength(_binaryData, _data.length);
_binaryData.resize(_data.length);
return this;
}

Expand All @@ -51,7 +51,7 @@ class FlxNapeTilemap extends FlxTilemap
{
super.loadMapFromArray(MapData, WidthInTiles, HeightInTiles, TileGraphic, TileWidth, TileHeight, AutoTile, StartingIndex, DrawIndex, CollideIndex);
_binaryData = new Array<Int>();
FlxArrayUtil.setLength(_binaryData, _data.length);
_binaryData.resize(_data.length);
return this;
}

Expand All @@ -60,7 +60,7 @@ class FlxNapeTilemap extends FlxTilemap
{
super.loadMapFrom2DArray(MapData, TileGraphic, TileWidth, TileHeight, AutoTile, StartingIndex, DrawIndex, CollideIndex);
_binaryData = new Array<Int>();
FlxArrayUtil.setLength(_binaryData, _data.length);
_binaryData.resize(_data.length);
return this;
}

Expand Down

0 comments on commit f76d8b2

Please sign in to comment.