UI fixes, add npc base class
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
|
||||
public class CharacterDescriptor : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
public CharacterSex Sex;
|
||||
private NavMeshAgent _navMeshAgent;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_navMeshAgent = GetComponentInParent<NavMeshAgent>();
|
||||
}
|
||||
|
||||
private void OnAnimatorMove()
|
||||
{
|
||||
transform.parent.position = _navMeshAgent.nextPosition;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user