private void CreateAccount(int connectionId, int channelId, int recHostId, Net_CreateAccount ca) { Debug.Log(string.Format("{0}, {1}, {2}", ca.Username, ca.Password, ca.Email)); Net_OnCreateAccount oca = new Net_OnCreateAccount(); oca.Success = 1; oca.Information = "Account was created!"; SendClient(recHostId, connectionId, oca); }
private void OnCreateAccount(Net_OnCreateAccount oca) { //not successful if (oca.response == 0) { LoginScene.Instance.EnableInputs(); LoginScene.Instance.ChangeAuthenticationText("Account Creation Failed"); } else { LoginScene.Instance.ChangeAuthenticationText("Successfully Created Account"); LoginScene.Instance.EnableInputs(); } }
private void CreateAccount(int connectionId, int channelId, int recievingHostId, Net_CreateAccount msg) { Net_OnCreateAccount rmsg = new Net_OnCreateAccount(); if (db.InsertAccount(msg.Username, msg.Password, msg.Email)) { rmsg.Success = 1; rmsg.Information = "Account was created!"; } else { rmsg.Success = 0; rmsg.Information = "There was an error creating the account!"; } SendClient(recievingHostId, connectionId, rmsg); }
private void CreateAccount(int cnnId, int channelId, int recHostId, Net_CreateAccount ca) { // Debug.Log(string.Format("{0},{1},{2}",ca.Username,ca.Password,ca.Email)); Net_OnCreateAccount oca = new Net_OnCreateAccount(); if (db.InsertAccount(ca.Username, ca.Password, ca.Email)) { oca.Success = 1; oca.Information = "Account was Created"; } else { oca.Success = 0; oca.Information = "There was an error creating account!"; } SendClient(recHostId, cnnId, oca); }
void OnCreateAccount(Net_OnCreateAccount oca) { //Save the data about the player self = new Net_PlayerInfo(oca.connectionId, oca.userName, oca.playerType); switch (oca.playerType) { case ("host"): { self.joinedHub = string.Format("{0}'s game", self.userName); SendServer(self, reliableChannel); SceneManager.LoadScene("Hub"); } break; case ("join"): { SendServer(self, reliableChannel); SceneManager.LoadScene("HubSelect"); } break; } }
private void OnCreateAccount(Net_OnCreateAccount oca) { LobbyScene.Instance.EnableInputs(); LobbyScene.Instance.ChangeAuthenticationMessage(oca.Information); }
void CreateAccount(int cnnId, int channelId, int recHostId, Net_CreateAccount ca) { Net_OnCreateAccount oca = new Net_OnCreateAccount(cnnId, ca.userName, ca.playerType); SendClient(cnnId, oca); }