示例#1
0
        async void Start()
        {
            client = new UdpClient(Port);

            agones = GetComponent <AgonesSdk>();
            bool ok = await agones.Connect();

            if (ok)
            {
                Debug.Log(("Server - Connected"));
            }
            else
            {
                Debug.Log(("Server - Failed to connect, exiting"));
                Application.Quit(1);
            }

            ok = await agones.Ready();

            if (ok)
            {
                Debug.Log($"Server - Ready");
            }
            else
            {
                Debug.Log($"Server - Ready failed");
                Application.Quit();
            }
        }
示例#2
0
        async void Start()
        {
            client = new UdpClient(Port);

            agones = GetComponent <AgonesSdk>();
            bool ok = await agones.Ready();

            if (ok)
            {
                Debug.Log($"Server - Ready");
            }
            else
            {
                Debug.Log($"Server - Ready failed");
                Application.Quit();
            }
        }
示例#3
0
 public static async Task Ready()
 {
     var agones = new AgonesSdk(new AgonesSdkOptions(), new DummyHttpClientFactory());
     await agones.Ready();
 }
示例#4
0
 public void SetComponentSDK(AgonesSdk component_)
 {
     component = component_;
 }
示例#5
0
 void Start()
 {
     client = new UdpClient(Port);
     agones = GetComponent <AgonesSdk>();
     StartCoroutine(StartAgonesCheck());
 }