using Assets.Scripts.GameSession; using TMPro; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; namespace UI.Views { public class DeathScreen1VS1 : MonoBehaviour { public TMP_Text Joueur1Text; public TMP_Text Joueur2Text; public TMP_Text CoinsText; public TMP_Text ScoreText; private void Start() { if (!string.IsNullOrEmpty(GameResult.MatchResult)) { switch (GameResult.MatchResult) { case "PLAYER1": Joueur1Text.text = "WINNER !"; Joueur2Text.text = "LOSER !"; break; case "PLAYER2": Joueur2Text.text = "WINNER !"; Joueur1Text.text = "LOSER !"; break; case "DRAW": Joueur1Text.text = "Draw"; Joueur2Text.text = "Draw"; break; } } else { } CoinsText.text = GameResult.coinsEarned.ToString(); ScoreText.text = GameResult.score.ToString() + "M"; } public void RestartGame() { SceneManager.LoadScene("DuoGameScene"); } public void QuitGame() { Application.Quit(); } } }