void Update() { ClientOper.Start(); id.text = ClientOper.Info().id.ToString(); login.text = ClientOper.Info().name.ToString(); all.text = ClientOper.Info().all.ToString(); win.text = ClientOper.Info().win.ToString(); lose.text = ClientOper.Info().lose.ToString(); ClientOper.Close(); }
void Start() { ClientOper.Start(); id = GameObject.Find("/Canvas/Text (5)").GetComponent <Text>(); login = GameObject.Find("/Canvas/Text (6)").GetComponent <Text>(); all = GameObject.Find("/Canvas/Text (9)").GetComponent <Text>(); win = GameObject.Find("/Canvas/Text (7)").GetComponent <Text>(); lose = GameObject.Find("/Canvas/Text (8)").GetComponent <Text>(); id.text = ClientOper.Info().id.ToString(); login.text = ClientOper.Info().name.ToString(); all.text = ClientOper.Info().all.ToString(); win.text = ClientOper.Info().win.ToString(); lose.text = ClientOper.Info().lose.ToString(); ClientOper.Close(); }
public void log() { /* DatabaseClient client = new DatabaseClient(new BasicHttpBinding(), new EndpointAddress( * new System.Uri("http://localhost:8733/Design_Time_Addresses/Service/Database/1"))); * * client.BDOpen();*/ ClientOper.Start(); GameObject inputFieldGo1 = GameObject.Find("/Canvas/Fields/InputField"); InputField inputFieldCo1 = inputFieldGo1.GetComponent <InputField>(); GameObject inputFieldGo2 = GameObject.Find("/Canvas/Fields/InputField (1)"); InputField inputFieldCo2 = inputFieldGo2.GetComponent <InputField>(); if (inputFieldCo1.text == "" || inputFieldCo2.text == "") { //UnityEditor.EditorUtility.DisplayDialog("Ошибка", "Заполните все поля", "ОК"); Error(ErrorButton2); } else if (ClientOper.Auth(inputFieldCo1.text, inputFieldCo2.text)) { Data.pass = inputFieldCo1.text; Application.LoadLevel(1); Debug.Log("Good " + Data.pass); } else { //UnityEditor.EditorUtility.DisplayDialog("Ошибка " + "Неправильный логин или пароль"); Error(ErrorButton1); Debug.Log("Bad"); } /* Statistic st = client.ShowInfo("vovaa"); * Debug.Log("id=" + st.id + " Name=" + st.name);*/ ClientOper.Close(); }
public void regist() { ClientOper.Start(); GameObject inputFieldGo1 = GameObject.Find("/Canvas/Fields/InputField"); InputField inputFieldCo1 = inputFieldGo1.GetComponent <InputField>(); GameObject inputFieldGo2 = GameObject.Find("/Canvas/Fields/InputField (1)"); InputField inputFieldCo2 = inputFieldGo2.GetComponent <InputField>(); GameObject inputFieldGo3 = GameObject.Find("/Canvas/Fields/InputField (2)"); InputField inputFieldCo3 = inputFieldGo3.GetComponent <InputField>(); if (inputFieldCo3.text == inputFieldCo2.text && inputFieldCo3.text != "" && inputFieldCo2.text != "" && inputFieldCo1.text != "" && ClientOper.AddP(inputFieldCo1.text, inputFieldCo2.text)) { Data.pass = inputFieldCo1.text; Debug.Log(Data.pass); Application.LoadLevel(1); } if (inputFieldCo3.text != inputFieldCo2.text && inputFieldCo3.text != "" && inputFieldCo2.text != "" && inputFieldCo1.text != "") { // UnityEditor.EditorUtility.DisplayDialog("Ошибка", "Пароли не совпадают", "ОК"); inputFieldCo1.text = ""; inputFieldCo2.text = ""; inputFieldCo3.text = ""; Error(ErrorButton1); } else if (inputFieldCo1.text == "" || inputFieldCo2.text == "" || inputFieldCo3.text == "") { // UnityEditor.EditorUtility.DisplayDialog("Ошибка", "Заполните все поля", "ОК"); inputFieldCo1.text = ""; inputFieldCo2.text = ""; inputFieldCo3.text = ""; Error(ErrorButton2); } ClientOper.Close(); }