using System.Collections.Generic;
using UnityEngine;

public class MapManager : MonoBehaviour
{
    public static List<NavPoint> navPoints { get; private set; }
    private void Start()
    {
        var i = 0;
        navPoints = new List<NavPoint>();
        var navPointsGameObj = GameObject.FindGameObjectsWithTag("Point");
        foreach (var gameobj in navPointsGameObj)
        {
            var navpoint = gameobj.GetComponent<NavPoint>();
            navpoint.PointId = i; i++;
            navPoints.Add(navpoint);            
        }
    }
}
