public void getHit() { health -= 1; if (health == 0) { Debug.Log("Rip 2"); _lMenager.winnerName = "Player 1"; _lMenager.GameEnd(); pause = true; } }
public void getHit() { if (_lMenager.GameMode == "MultiPlayer") { health -= 1; if (health == 0) { Debug.Log("Rip 1"); _lMenager.winnerName = "Player 2"; _lMenager.GameEnd(); pause = true; } } else { Debug.Log("Rip 1"); _lMenager.LifeCounter(); Destroy(this.gameObject); } }