/** * Pushes player data to server */ public void PushToServer() { string buildingJSON = this.jsonify(); // TODO Send JSON to server StartCoroutine(GetHTTP.toSave(buildingJSON, updateBuildings)); }
/** * Logs the user into the server and changes the scene */ public void LogIn() { string password = inputFields[0].textComponent.text; string username = inputFields[1].textComponent.text; StartCoroutine(GetHTTP.login(username, password, verifyLogin)); }
/** * Creates an account for the user */ public void CreateAccount() { string password = inputFields[0].textComponent.text; string username = inputFields[1].textComponent.text; StartCoroutine(GetHTTP.createAccount("timothy", username, password, username + "@chi.com", verifyAccount)); }
private void Check_Update(bool Tip) // 检查更新 { string strHTML = GetHTTP.Get_HTTP("https://api.xiuer.pw/ver/win10kscdmhxgj.txt", 10000, "utf-8"); string[] Ver_Info = strHTML.Split('\n'); if (Ver_Info.Length > 2 && Ver_Info[1] != Now_VerInfo) { if (MessageBox.Show("发现新版本 [v" + Ver_Info[1] + "]!是否前往更新?", "发现新版本!", MessageBoxButtons.YesNo) == DialogResult.Yes) { Process.Start(Ver_Info[2]); } } else { if (Tip == true) { MessageBox.Show("当前已是最新版本 " + Now_VerInfo + " !", "信息:", MessageBoxButtons.OK); } } }