private void StartUpdate() { updateTask = RegisterUpdate.UpdateWhile( () => { transform.rotation = Quaternion.Lerp(transform.rotation, Quaternion.Euler(transform.position - target), RotateSpeed * Time.deltaTime); character.Move(transform.forward * speed * Time.deltaTime); }, () => true); }
private void btnRegister_Click(object sender, EventArgs e) { register = new RegisterUpdate(); string username = txtUsername.Text; string email = txtEmail.Text; string password = txtPassword.Text; string repeatPassword = txtRepeatPassword.Text; string name = txtName.Text; string surname = txtSurname.Text; int zipcode = 0; Int32.TryParse(txtZipcode.Text, out zipcode); string city = txtCity.Text; string adress = txtAddress.Text; string endResult = register.AddNewUser(name, surname, username, password, repeatPassword, email, city, zipcode, adress, imagePath); MessageBox.Show(endResult); if (endResult == "Success! You have successfully made an account for Custom Pizza!") { GoToLogin(); } }
private void btnSaveChanges_Click(object sender, EventArgs e) { update = new RegisterUpdate(); string username = txtUsername.Text; string email = txtEmail.Text; string password = txtPassword.Text; string repeatPassword = txtRepeatPassword.Text; string name = txtName.Text; string surname = txtSurname.Text; int zipcode = 0; Int32.TryParse(txtZipcode.Text, out zipcode); string city = txtCity.Text; string adress = txtAddress.Text; string endResult = update.UpdateUser(currentUser, name, surname, username, password, repeatPassword, email, city, zipcode, adress, imagePath); MessageBox.Show(endResult); if (endResult == "Success! You have successfully made change/s on your account for Custom Pizza! Changes will take affect once you get out of option menu!") { Close(); } }