mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-09-14 13:25:16 -05:00
Added base for IEnumerator of Connection Timeout
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using MLAPI;
|
||||
using MLAPI.SceneManagement;
|
||||
using MLAPI.Transports.UNET;
|
||||
using System.Collections;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
@@ -14,6 +15,8 @@ public class ConnectButtons : MonoBehaviour {
|
||||
|
||||
public InputField ipAddressField;
|
||||
|
||||
private int connectionTimeoutTime = 5;
|
||||
|
||||
void Start() {
|
||||
// Make sure the Error Panel is not enabled to start
|
||||
ErrorPanel.SetActive(false);
|
||||
@@ -58,6 +61,12 @@ public class ConnectButtons : MonoBehaviour {
|
||||
// TODO: Have to throw an error if can't connect to that IP
|
||||
}
|
||||
|
||||
IEnumerator checkIsConnectedClient() {
|
||||
yield return new WaitForSecondsRealtime(connectionTimeoutTime);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void ThrowError(string errorMsg) {
|
||||
ErrorText.text = errorMsg;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user