18 lines
408 B
C#
18 lines
408 B
C#
using UnityEngine;
|
|
|
|
namespace HexGrid
|
|
{
|
|
using UnityEngine;
|
|
using UnityEngine.AI;
|
|
public class NPCManager : MonoBehaviour
|
|
{
|
|
public Transform targetPoint;
|
|
private NavMeshAgent agent;
|
|
void Start()
|
|
{
|
|
agent = GetComponent<NavMeshAgent>();
|
|
if (targetPoint != null)
|
|
agent.SetDestination(targetPoint.position);
|
|
}
|
|
}
|
|
} |