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); }
public static void TurnOff(SniperEnemy b) { b.gameObject.SetActive(false); }
public static void TurnOn(SniperEnemy b) { b.gameObject.SetActive(true); b.Reset(); }
public void ReturnEnemy(SniperEnemy b) { poolSniperEnemy.ReturnObject(b); }