备份CatanBuilding瘦身独立工程
This commit is contained in:
18
Assets/Scripts/HexGrid/HexNpcManager.cs
Normal file
18
Assets/Scripts/HexGrid/HexNpcManager.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user