Files
2026-05-20 10:09:16 +07:00

23 lines
503 B
C#

using UnityEngine;
namespace AutoMove
{
/// <summary>Matches C++ AutoMove::PathNode (PfConstant.h).</summary>
public struct PathNode
{
public Vector2 ptMap;
public int layer;
public Vector2Int GetPtI()
{
return new Vector2Int(Mathf.FloorToInt(ptMap.x), Mathf.FloorToInt(ptMap.y));
}
public void SetI(Vector2Int pt, int iLayer)
{
ptMap = new Vector2(pt.x, pt.y);
layer = iLayer;
}
}
}