51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
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;
|
|
|
|
private void Start()
|
|
{
|
|
if (!string.IsNullOrEmpty(GameSession.MatchResult))
|
|
{
|
|
switch (GameSession.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
|
|
{
|
|
}
|
|
}
|
|
|
|
public void RestartGame()
|
|
{
|
|
SceneManager.LoadScene("DuoGameScene");
|
|
}
|
|
|
|
public void QuitGame()
|
|
{
|
|
Application.Quit();
|
|
}
|
|
}
|
|
|
|
} |