private void Start() { patrollingAI = GetComponent <PatrollingAI>(); CreateBehaviourTree(); StartCoroutine(EvaluateTree()); }
void SetInitialReferences() { enemyMaster = GetComponent <EnemyMaster>(); myWanderAI = GetComponent <WanderingAI>(); patrollingAI = GetComponent <PatrollingAI>(); if (GetComponent <NavMeshAgent>() != null) { myNavMeshAgent = GetComponent <NavMeshAgent>(); } checkRate = Random.Range(0.1f, 0.2f); }
void SetInitialReferences() { enemyMaster = GetComponent <EnemyMaster>(); myWanderingAI = GetComponent <WanderingAI>(); patrollingAI = GetComponent <PatrollingAI>(); myTransform = transform; if (head == null) { head = myTransform; } checkRate = Random.Range(0.8f, 1.2f); }