Skip to content

Instantly share code, notes, and snippets.

@CloudyWater
Created January 29, 2017 19:29
Show Gist options
  • Save CloudyWater/41c0515ca81a19ea2d80934c392475f1 to your computer and use it in GitHub Desktop.
Save CloudyWater/41c0515ca81a19ea2d80934c392475f1 to your computer and use it in GitHub Desktop.
Manages our Account Creation menu
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
[RequireComponent (typeof (DatabaseConnection))]
public class MainMenuManager : MonoBehaviour
{
public InputField UsernameInput, PasswordInput, CreateUsernameInput, CreateEmailInput, CreatePassword, CreateVerifyPassword;
private DatabaseConnection Connection;
// Use this for initialization
void Start ()
{
Connection = GetComponent<DatabaseConnection> ();
}
// Update is called once per frame
void Update ()
{
}
public void CreateNewAccount ()
{
if (CreateUsernameInput.text != "" && CreateEmailInput.text != "" && CreatePassword.text != "" && CreatePassword.text
== CreateVerifyPassword.text)
{
Connection.CreateAccount (CreateEmailInput.text, CreateUsernameInput.text, CreatePassword.text);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment