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); } }
private void OnRegisterCompleted(RegisterAccountToServer.RegisterResult result) { Debug.Log($"OnRegisterCompleted - Rusult : {result}"); switch (result) { case RegisterAccountToServer.RegisterResult.Success: void resetRegisterForm() { ResetForm(); cancelTransition.OnTransitionCompleted -= resetRegisterForm; } void onHide(string message) { cancelTransition.OnTransitionCompleted += resetRegisterForm; cancelTransition.Execute(); ConnectingDialog.OnHide -= onHide; } ConnectingDialog.OnHide += onHide; ConnectingDialog.Success(); break; case RegisterAccountToServer.RegisterResult.Failed_Mysql: break; case RegisterAccountToServer.RegisterResult.Failed_Username: // TODO : if username was already registered break; case RegisterAccountToServer.RegisterResult.Failed_Insert: break; } }