void OnTriggerEnter(Collider c) { BalaNave bala = c.gameObject.GetComponent <BalaNave> (); if (bala != null) { audioDano.Play(); vidasBoss--; if (vidasBoss < 5) { rendBoss.material.color = Color.red; InvokeRepeating("Disparar", 0.5f, 0.5f); if (invencible == false) { StartCoroutine("Invencible"); } } if (vidasBoss < 1) { SceneManager.LoadScene(9); Destroy(this.gameObject); } } }
void OnTriggerEnter(Collider c) { BalaNave bala = c.gameObject.GetComponent <BalaNave>(); if (bala != null) { vidasEnemigo--; if (vidasEnemigo < 1) { Destroy(this.gameObject); } } }
void OnTriggerEnter(Collider c) { BalaNave balaN = c.gameObject.GetComponent <BalaNave>(); if (balaN != null) { Destroy(this.gameObject); } Controles cont = c.gameObject.GetComponent <Controles>(); if (cont != null) { ManagerLevel.instancia.vidas--; Destroy(this.gameObject); } }