private void EndGame() { themeAudio.Stop(); endGameAudio.Play(); if (redHouse.CurrentHealth > blueHouse.CurrentHealth) { blueHouse.EndGame(); } else if (redHouse.CurrentHealth < blueHouse.CurrentHealth) { redHouse.EndGame(); } else { endScreen.ShowDraw(); } }
public void MatchEnd(ulong playerId, BoardSymbol winnerSymbol) { _numberOfPlays = 0; EndScreen endScreen = UIController.Instance.GetScreen(UIScreen.EndGame).GetComponent <EndScreen>(); if (winnerSymbol == BoardSymbol.None) { endScreen.ShowDraw(); } else if (IWin(playerId, winnerSymbol)) { endScreen.ShowWin(); } else { endScreen.ShowLose(); } UIController.Instance.GoToScreen(UIScreen.EndGame); }