Selling Functionality, Picking up items, Basic computer
This commit is contained in:
18
Assets/Customer/CustomerController.cs
Normal file
18
Assets/Customer/CustomerController.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
|
||||
public class CustomerController : MonoBehaviour {
|
||||
NavMeshAgent _navMeshAgent;
|
||||
private Transform _target;
|
||||
|
||||
private void Awake() {
|
||||
_navMeshAgent = GetComponent<NavMeshAgent>();
|
||||
}
|
||||
|
||||
private void Update() {
|
||||
_target = PlayerController.Instance.transform;
|
||||
_navMeshAgent.SetDestination(_target.position);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user