rc
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user