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,34 @@
namespace MrGameEng.Pathfinding;
/// <summary>Neighbor connectivity of a grid.</summary>
public enum GridConnectivity
{
/// <summary>Orthogonal moves only.</summary>
Four = 4,
/// <summary>Orthogonal and diagonal moves. Diagonals never cut corners.</summary>
Eight = 8,
}
/// <summary>
/// A grid the pathfinding algorithms operate on. The game implements this over its own
/// world representation (terrain cells, a <c>TileGrid</c>, …) — the pathfinding module
/// never owns world data.
/// </summary>
public interface IPathGrid
{
/// <summary>Grid width in cells.</summary>
int Width { get; }
/// <summary>Grid height in cells.</summary>
int Height { get; }
/// <summary>True when the cell can be entered. Out-of-range cells are never queried.</summary>
bool IsPassable(int x, int y);
/// <summary>
/// Cost multiplier for entering the cell, <b>must be ≥ 1</b> (1 = normal terrain,
/// 3 = swamp three times slower, …). Used by A* and Dijkstra; ignored by BFS.
/// </summary>
float Cost(int x, int y);
}