This commit is contained in:
2026-08-20 19:45:38 +05:30
parent 74d9fae6e6
commit 78592e8d8e
87 changed files with 13154 additions and 223 deletions
+20 -2
View File
@@ -455,8 +455,10 @@ public class GameOverCanvas : MonoBehaviour
yield return new WaitForSeconds(scaleTime * 0.5f);
//Rewards
float ccReward = GameTutorialManager.tutorialModeEnabled ? 0f : 100f;
//Rewards — participation CC only if this client stayed connected through match end
float ccReward = GameTutorialManager.tutorialModeEnabled || !GameManager.LocalPlayerEarnedParticipationCc
? 0f
: GameManager.ParticipationCcAmount;
StartCoroutine(CoroutineSetTextNumber(rcPrize, txtRewardRC, 10, "N1", "+", " RC"));
StartCoroutine(CoroutineSetTextNumber(ccReward, txtRewardCC, 100, "N0", "+", " CC"));
@@ -533,6 +535,22 @@ public class GameOverCanvas : MonoBehaviour
countdownCoroutine = StartCoroutine(CoroutineCountdown());
}
public void OnRematchFailed(string errorMessage)
{
btnRematch.interactable = true;
btnLeave.interactable = true;
if (rematchWarningLoser != null)
rematchWarningLoser.text = "Rematch failed.";
StartCoroutine(CoroutineHideRematchPanel());
if (countdownCoroutine != null)
StopCoroutine(countdownCoroutine);
countdownCoroutine = StartCoroutine(CoroutineCountdown());
string body = string.IsNullOrEmpty(errorMessage) ? "Could not start a rematch." : errorMessage;
MessageBoxDialog.Show("Rematch failed", body);
}
IEnumerator CoroutineHideRematchPanel(){
rematchPopup.DOScale(0, 0.2f).SetEase(Ease.InBack);
yield return new WaitForSeconds(0.2f);