Пример #1
0
 void Awake()
 {
     player = GameObject.FindGameObjectWithTag("Player").transform;
     playerHealth = player.GetComponent<MyPlayerHeath>();
     enemyHealth = GetComponent<MyEnemyHealth>();
     nav = GetComponent<NavMeshAgent>();
 }
Пример #2
0
 void Awake()
 {
     player = GameObject.FindGameObjectWithTag("Player");
     playerHealth = player.GetComponent<MyPlayerHeath>();
     anim = GetComponent<Animator>();
 }