Skip to content

Commit

Permalink
style: rename param var
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammin committed May 12, 2024
1 parent f5379d7 commit 9121365
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,19 @@ public T GetObject<T>(int uid) where T : ScriptableObject
return null;
}

public Sprite GetSpriteForTilesetRectangle(TilesetRectangle def)
public Sprite GetSpriteForTilesetRectangle(TilesetRectangle rectangle)
{
if (def == null)
if (rectangle == null)
{
return null;
}

if (!_allSprites.TryGetValue(def.TilesetUid, out var sprites))
if (!_allSprites.TryGetValue(rectangle.TilesetUid, out var sprites))
{
TilesetDefinition tilesetDef = def.Tileset;
TilesetDefinition tilesetDef = rectangle.Tileset;
if (tilesetDef == null)
{
_logger.LogError($"Problem getting sprite for TilesetRectangle def uid {def.TilesetUid}: No definition exists?");
_logger.LogError($"Problem getting sprite for TilesetRectangle def uid {rectangle.TilesetUid}: No definition exists?");
return null;
}

Expand All @@ -223,9 +223,9 @@ public Sprite GetSpriteForTilesetRectangle(TilesetRectangle def)
return null;
}

if (!sprites.TryGetValue(def.UnityRect, out var sprite))
if (!sprites.TryGetValue(rectangle.UnityRect, out var sprite))
{
_logger.LogError($"Problem getting sprite for TilesetRectangle def uid {def.TilesetUid}: Couldn't get the sprite from the dictionary for the Rect {def.UnityRect} out of {sprites.Count} possible rects");
_logger.LogError($"Problem getting sprite for TilesetRectangle def uid {rectangle.TilesetUid}: Couldn't get the sprite from the dictionary for the Rect {rectangle.UnityRect} out of {sprites.Count} possible rects");
return null;
}

Expand Down

0 comments on commit 9121365

Please sign in to comment.