void Start() { behaviourScript = GetComponent <g_AIBehaviourScript>(); animationScript = GetComponent <g_AIAnimationScript>(); gunScript = GetComponent <g_AIGunScript>(); soundScript = GetComponent <g_AISoundScript>(); coverScript = GetComponent <g_AISetCoverNode>(); rotateScript = GetComponent <g_AIRotateToTarget>(); navmesh = GetComponent <NavMeshAgent>(); dissolveScript = GetComponent <CustomDissolve>(); meleeScript = GetComponent <G_AIMeleeScript>(); maxHealth = health; }
// Use this for initialization void Start() { navMesh = GetComponent <NavMeshAgent> (); animationScript = GetComponent <g_AIAnimationScript> (); gunScript = GetComponent <g_AIGunScript> (); soundScript = GetComponent <g_AISoundScript>(); player = GameObject.Find("Player"); for (int i = 0; i < Actions.Count; i++) { Actions[i].Setup(); if (Actions[i].action == AIAction.ActionStates.crouch) { GetComponent <g_AISetCoverNode>().SetUpCoverNodes(); GetComponent <g_AISetCoverNode>().FindCloseCover(); } } }