public void ActivateDeath()
 {
     gameObject.GetComponent <Renderer>().material = matOff;
     foreach (GameObject g in squadron)
     {
         BasicEnemy be = g.GetComponent <BasicEnemy>();
         if (be)
         {
             be.Unprotect();
         }
         else
         {
             SniperEnemy se = g.GetComponent <SniperEnemy>();
             if (se)
             {
                 se.Unprotect();
             }
             else
             {
                 RadialShooter re = g.GetComponent <RadialShooter>();
                 if (re)
                 {
                     re.Unprotect();
                 }
             }
         }
     }
     //Instantiate(explosionPS, new Vector3(0.0f,0.0f,0.0f), new Quaternion());
     Instantiate(explosionPS, gameObject.transform.position, gameObject.transform.rotation);
     Destroy(gameObject);
 }
Beispiel #2
0
 public static void TurnOff(SniperEnemy b)
 {
     b.gameObject.SetActive(false);
 }
Beispiel #3
0
 public static void TurnOn(SniperEnemy b)
 {
     b.gameObject.SetActive(true);
     b.Reset();
 }
Beispiel #4
0
 public void ReturnEnemy(SniperEnemy b)
 {
     poolSniperEnemy.ReturnObject(b);
 }