Exemplo n.º 1
0
 void Awake()
 {
     musicPlaying       = false;
     zombieSight        = GetComponent <ZombieSight>();
     nav                = GetComponent <NavMeshAgent>();
     player             = GameObject.FindGameObjectWithTag("Player").transform;
     lastPlayerSighting = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>();
     playerHealth       = player.GetComponent <PlayerHealth>();
 }
Exemplo n.º 2
0
 void Awake()
 {
     speedFloat        = Animator.StringToHash("Speed");
     angularSpeedFloat = Animator.StringToHash("AngularSpeed");
     player            = GameObject.FindGameObjectWithTag("Player").transform;
     zombieSight       = GetComponent <ZombieSight>();
     nav  = GetComponent <NavMeshAgent>();
     anim = GetComponent <Animator>();
     nav.updateRotation = false;
     deadZone          *= Mathf.Deg2Rad;
 }