private void HelloWorldCallback(string message) { if (message == "Hello World") { ServerAddress.ServerIP = FindObjectOfType <LANForm_ServerIPInput>().LanIP; ConnectingDialog.Success(); } else { ConnectingDialog.Failed(); } }
private void LoginCallback(LoginToServer.LoginResult result, string username, string birthday, Gender gender) { if (result == LoginToServer.LoginResult.Success) { void resetPassword() { password.text = null; loginToHomeTransition.OnTransitionCompleted -= resetPassword; } loginToHomeTransition.OnTransitionCompleted += resetPassword; loginToHomeTransition.Execute(); FindObjectOfType <Home>().SetValue(username, birthday, gender); ConnectingDialog.Success(); } else { ConnectingDialog.Failed(); } }
public void Awake() { if (string.IsNullOrEmpty(ServerAddress.ServerIP) == false) { void _local_HelloWorldCallback(string message) { if (message == ServerAddress.HelloWorldMessage) { ConnectingDialog.Success(); GetComponent <UITweenFormTransition>().Execute(); } else { ConnectingDialog.Failed(); } } ConnectingDialog.Connecting(true); new GameObject(nameof(ConnectToServer)).AddComponent <ConnectToServer>().ConnectToHelloWorld(ServerAddress.HelloWorldAdderss, _local_HelloWorldCallback); } }