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
+17
View File
@@ -486,6 +486,14 @@ public class NetPlayer : NetworkBehaviour
Logger.Log(matchmadeResponseString);
StartCoroutine(CoroutineOnRematchConfirmedServer());
}
else
{
string error = string.IsNullOrEmpty(resp.ErrorMessage)
? "Could not start a rematch."
: resp.ErrorMessage;
Logger.Log("Rematch failed: " + error);
RpcRematchFailed(error);
}
}
IEnumerator CoroutineOnRematchConfirmedServer(){
@@ -545,6 +553,15 @@ public class NetPlayer : NetworkBehaviour
LevelLoadManager.instance.Leave("Game");
}
[ClientRpc]
void RpcRematchFailed(string errorMessage)
{
if (GameOverCanvas.instance != null)
GameOverCanvas.instance.OnRematchFailed(errorMessage);
else
MessageBoxDialog.Show("Rematch failed", string.IsNullOrEmpty(errorMessage) ? "Could not start a rematch." : errorMessage);
}
void OnRematchCancelledServer(){
if(!isServer){ return; }