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