final commit
This commit is contained in:
@ -4,16 +4,23 @@ using UnityEngine;
|
||||
|
||||
public class DumbAI : MonoBehaviour
|
||||
{
|
||||
public Transform feetTransform;
|
||||
// Start is called before the first frame update
|
||||
[SerializeField]
|
||||
private List<NavPoint> _aiPathRaw;
|
||||
private Queue<NavPoint> _aiPath;
|
||||
private int _nextPointId;
|
||||
|
||||
void Start()
|
||||
{
|
||||
var current_position = feetTransform.transform.position;
|
||||
_aiPath = new Queue<NavPoint>(_aiPathRaw);
|
||||
StepOnNavPoint();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
private void StepOnNavPoint()
|
||||
{
|
||||
|
||||
if (_aiPath.Count != 0)
|
||||
{
|
||||
_nextPointId = _aiPath.Peek().PointId;
|
||||
_aiPath.Dequeue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user