void Begin()
 {
     enemySeeker       = GetComponent <EnemySeeker>();
     enemyCombo        = GetComponent <EnemyCombo>();
     enemyRetreat      = GetComponent <EnemyRetreat>();
     enemyRecoverer    = GetComponent <EnemyRecoverer>();
     enemyDeath        = GetComponent <EnemyDeath>();
     enemyGravityCheck = GetComponent <EnemyGravityCheck>();
 }
Exemplo n.º 2
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player" && !m_Detected)
     {
         m_Detected = true;
         EnemySeeker enemy = GetComponentInParent <EnemySeeker>();
         if (enemy != null)
         {
             enemy.Seek(other.gameObject);
         }
         this.enabled = false;
     }
 }