27 lines
543 B
C#
27 lines
543 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class DumbAI : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private List<NavPoint> _aiPathRaw;
|
|
private Queue<NavPoint> _aiPath;
|
|
private int _nextPointId;
|
|
|
|
void Start()
|
|
{
|
|
_aiPath = new Queue<NavPoint>(_aiPathRaw);
|
|
StepOnNavPoint();
|
|
}
|
|
|
|
private void StepOnNavPoint()
|
|
{
|
|
if (_aiPath.Count != 0)
|
|
{
|
|
_nextPointId = _aiPath.Peek().PointId;
|
|
_aiPath.Dequeue();
|
|
}
|
|
}
|
|
}
|