23 lines
503 B
C#
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;
|
|
}
|
|
}
|
|
}
|