32 lines
504 B
C#
32 lines
504 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.AI;
|
|
|
|
public class NPCBrain : MonoBehaviour
|
|
{
|
|
[Header("Decision Profile")]
|
|
[SerializeField] private NPCDecisionProfile decisionProfile;
|
|
|
|
NavMeshAgent agent;
|
|
public NavMeshAgent Agent => agent;
|
|
|
|
private void Start()
|
|
{
|
|
StartCoroutine(Decide());
|
|
}
|
|
|
|
IEnumerator Decide()
|
|
{
|
|
yield return null;
|
|
}
|
|
}
|
|
|
|
|
|
// idle
|
|
// patrol
|
|
// pursuit
|
|
// recall
|
|
// attack
|
|
// block
|