fix: TileRegistry floor-range warning, GroupViewsByFloor tests, stopwatch cleanup
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Core.Domain;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Infrastructure.Unity
|
||||
{
|
||||
@@ -30,7 +31,12 @@ namespace Infrastructure.Unity
|
||||
|
||||
foreach (var tile in _tiles)
|
||||
{
|
||||
if (tile.Floor < floorCount && _views.TryGetValue(tile.Id, out var view))
|
||||
if (tile.Floor >= floorCount)
|
||||
{
|
||||
Debug.LogWarning($"TileRegistry: tile '{tile.Id}' floor {tile.Floor} >= floorCount {floorCount}, skipping");
|
||||
continue;
|
||||
}
|
||||
if (_views.TryGetValue(tile.Id, out var view))
|
||||
floors[tile.Floor].Add(view);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user