Ejemplo n.º 1
0
 private void Awake()
 {
     if (instance != null)
     {
         return;
     }
     instance = this;
     isDead   = false;
 }
 public void Awake()
 {
     if (soldierState == EnemySoldierState.Pacing)
     {
         GetComponent <PaceInCircle>().enabled = true;
     }
     hitManager.OnHitWithBullet += EnemySoldierHitWithBullet;
     healthManager     = GetComponent <ZombieHealthManager>();
     moveTowardsPlayer = GetComponent <MoveTowardsPlayer>();
     rigidBody         = transform.GetComponent <Rigidbody2D>();
 }
 public void Awake()
 {
     if (zombieState == ZombieState.Pacing)
     {
         GetComponent <PaceInCircle>().enabled = true;
     }
     hitManager.OnHitWithBullet += ZombieHitWithBullet;
     healthManager     = GetComponent <ZombieHealthManager>();
     moveTowardsPlayer = GetComponent <MoveTowardsPlayer>();
     rigidBody         = transform.GetComponent <Rigidbody2D>();
     audioManager      = FindObjectOfType <AudioManager>();
 }