Patrons now spawn in and are randomly assigned demon status.
This commit is contained in:
parent
c0ee8ea5c3
commit
5d203d1e9d
12 changed files with 111 additions and 1189 deletions
|
|
@ -3,12 +3,23 @@ using System.Collections;
|
|||
|
||||
public class WalkAI : MonoBehaviour {
|
||||
|
||||
public GameObject[] destinations;
|
||||
private GameObject[] destinations;
|
||||
public int currentDestIndex = 0;
|
||||
|
||||
private NavMeshAgent nva;
|
||||
|
||||
void Awake() {
|
||||
|
||||
GameObject[] allPois = GameObject.FindGameObjectsWithTag("pois");
|
||||
|
||||
GameObject poi1 = allPois[Random.Range (0, allPois.Length)];
|
||||
GameObject poi2 = allPois[Random.Range (0, allPois.Length)];
|
||||
|
||||
destinations = new GameObject[2] {
|
||||
poi1,
|
||||
poi2
|
||||
};
|
||||
|
||||
nva = GetComponent<NavMeshAgent>();
|
||||
nva.updateRotation = false;
|
||||
nva.SetDestination(destinations[currentDestIndex].transform.position);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue