cheer fx and post match screen

This commit is contained in:
2026-04-05 09:23:55 +05:30
parent 352693c860
commit 4cabf27f29
21 changed files with 19623 additions and 42 deletions
@@ -21,6 +21,10 @@ public class LevelLoadManager : MonoBehaviour
public TMP_Text p1_name, p2_name;
public TMP_Text p1_l10, p2_l10;
public Sprite redIcon, blueIcon;
public TMP_Text txtMiddle;
[Header("Game Over UI")]
public GameObject p1_winner;
public GameObject p2_winner;
void Awake()
{
@@ -71,13 +75,22 @@ public class LevelLoadManager : MonoBehaviour
canvasGroup.interactable=false;
contentImage.fillOrigin = 1;
canvasGroup.DOFade(0, transitionDuration).SetEase(Ease.InSine);
contentImage.DOFillAmount(0, transitionDuration).SetEase(Ease.InSine);
contentImage.DOFillAmount(0, transitionDuration).SetEase(Ease.InSine).OnComplete(() => {
if(gameOver){
gameOver = false;
matchmadeUI.SetActive(false);
}
});
}
public void SetupMatchMade(Team myTeam, string opponentName, string myName, string myL10, string opponentL10){
Team myTeam = Team.Red;
public void SetupMatchMade(Team myTeam_, string opponentName, string myName, string myL10, string opponentL10){
myTeam = myTeam_;
matchmadeUI.SetActive(true);
p1_winner.SetActive(false);
p2_winner.SetActive(false);
txtMiddle.text = "VS";
if(myTeam == Team.Red){
p1_red.SetActive(true);
p1_blue.SetActive(false);
@@ -101,4 +114,51 @@ public class LevelLoadManager : MonoBehaviour
p1_l10.text = myL10;
p2_l10.text = opponentL10;
}
MatchmadePlayer myPlayer;
MatchmadePlayer opponentPlayer;
public void SetupMatchMade(Team myTeam_, MatchmadePlayer myPlayer_, MatchmadePlayer opponentPlayer_){
myTeam = myTeam_;
myPlayer = myPlayer_;
opponentPlayer = opponentPlayer_;
string opponentName = opponentPlayer_.Name;
string myName = myPlayer_.Name;
string myL10 = $"L10 {myPlayer.l10_wins} -{myPlayer.l10_losses}";
string opponentL10 = $"L10 {opponentPlayer.l10_wins} -{opponentPlayer.l10_losses}";
SetupMatchMade(myTeam, myName, opponentName, myL10, opponentL10);
}
bool gameOver = false;
public void SetupGameOver(Team winningTeam, int redScore, int blueScore){
gameOver = true;
txtMiddle.text = $"{(myTeam == Team.Red ? redScore : blueScore)} FINAL {(myTeam == Team.Red ? blueScore : redScore)}";
if(myTeam == winningTeam){
p1_winner.SetActive(true);
p2_winner.SetActive(false);
myPlayer.l10_wins++;
myPlayer.l10_losses--;
opponentPlayer.l10_losses++;
opponentPlayer.l10_wins--;
}else{
p1_winner.SetActive(false);
p2_winner.SetActive(true);
opponentPlayer.l10_wins++;
opponentPlayer.l10_losses--;
myPlayer.l10_losses++;
myPlayer.l10_wins--;
}
p1_l10.text = $"L10 {myPlayer.l10_wins}-{myPlayer.l10_losses}";
p2_l10.text = $"L10 {opponentPlayer.l10_wins}-{opponentPlayer.l10_losses}";
}
}