using System.Collections; using System.Collections.Generic; using UnityEngine; public class DumbAI : MonoBehaviour { [SerializeField] private List _aiPathRaw; private Queue _aiPath; private int _nextPointId; void Start() { _aiPath = new Queue(_aiPathRaw); StepOnNavPoint(); } private void StepOnNavPoint() { if (_aiPath.Count != 0) { _nextPointId = _aiPath.Peek().PointId; _aiPath.Dequeue(); } } }