void Awake()
 {
     player       = GameObject.FindGameObjectWithTag("Player");
     playerHealth = player.GetComponent <PlayerHealth> ();
     enemyHealth  = GetComponent <StarEnemyHealth>();
     //anim = GetComponent <Animator> ();
 }
Exemple #2
0
 // Use this for initialization
 void Awake()
 {
     player          = GameObject.FindGameObjectWithTag("Player").transform;
     playerHealth    = player.GetComponent <PlayerHealth> ();
     starEnemyHealth = GetComponent <StarEnemyHealth> ();
     nav             = GetComponent <NavMeshAgent> ();
     starEnemyAttack = GetComponent <StarEnemyAttack> ();
 }