void On_Firing_Received()
 {
     if (!poolBullets.IsEmpty())
     {
         StartCoroutine(FireRoute());    //fires when player is detected
     }
     else
     {
         StopAllCoroutines();
         StartCoroutine("StopFire");
     }
 }
Esempio n. 2
0
 private void OnTriggerEnter(Collider other)
 {
     //Debug.Log(other.gameObject + " collider detected");
     if (other.tag == "Player")
     {
         if (!poolBullets.IsEmpty())
         {
             StartCoroutine(FireRoute());    //fires when player is detected
         }
     }
 }