Remove obsolete project files for MrGameEng.AI, MrGameEng.Assets, MrGameEng.Atlases, and MrGameEng.Collisions modules. Introduce new AssetManager and related classes for asset loading and management, including support for texture atlases and mod definitions. Enhance mod loading capabilities with DefDatabase and LanguageManager for JSON-based definitions and localization. Implement a shelf packing algorithm for efficient texture atlas creation.

This commit is contained in:
Leonid Pershin
2026-06-12 07:47:04 +03:00
parent 1f87fb0b74
commit c30e2ce764
70 changed files with 0 additions and 233 deletions
@@ -0,0 +1,23 @@
using MrGameEng.Pathfinding;
namespace MrGameEng.Pathfinding.Tests;
/// <summary>Грид из строк: '#' — стена, '.' — клетка с ценой 1, '2'..'9' — клетка с этой ценой.</summary>
public sealed class TestGrid : IPathGrid
{
private readonly string[] _rows;
public TestGrid(params string[] rows) => _rows = rows;
public int Width => _rows[0].Length;
public int Height => _rows.Length;
public bool IsPassable(int x, int y) => _rows[y][x] != '#';
public float Cost(int x, int y)
{
var cell = _rows[y][x];
return cell is >= '2' and <= '9' ? cell - '0' : 1f;
}
}