示例#1
0
文件: Mover.cs 项目: frms/game-jams
    public int findNextUnoccupiedNode(Vector2 pos)
    {
        int i = currentPath.getClosestSegement(pos);

        for (; i < currentPath.Length; i++)
        {
            int[] mapCoords = Map.map.worldToMapPoint(currentPath[i]);

            if (Map.map.getObj(mapCoords) == null)
            {
                break;
            }
        }

        return(i);
    }