예제 #1
0
 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;
 }
예제 #2
0
 // 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();
         }
     }
 }