private void RetrievedHighscores(bool _success, DatabaseHandler.ErrorResult _error, NameValueCollection _collection) { if (!_success) { return; } ClearHighscoreList(); for (int i = 0; i < 10; ++i) { string username = _collection.GetString("Username" + i); string score = _collection.GetString("Score" + i); GameObject go = Instantiate(HighscoreEntryPrefab, HighscoresRoot.transform); if (go) { Text text = go.GetComponent <Text>(); if (text) { text.text = username + "\t" + score; } } } }
private void UnfriendedComplete(bool _success, DatabaseHandler.ErrorResult _error) { if (_success) { profile.Friends.Remove(DatabaseHandler.Username); RefreshFriended(); } }
private void CreateAccountCallback(bool _success, DatabaseHandler.ErrorResult _message) { UICanvas.Get().TurnOffDarkenator(); if (_success) { MasterManager.instance.PanelManager.ChangePanels(EGameScreens.GS_Login); } }
void PasswordChangeCallback(bool _success, DatabaseHandler.ErrorResult _error) { UICanvas.Get().TurnOffDarkenator(); if (_success) { Close(); } }
private void OnRetrievedMyProfile(bool _success, DatabaseHandler.ErrorResult _error, NameValueCollection _params) { if (_success) { username.text = _params.GetString("Username"); defaultProfileData = new ProfileData(_params); SetDisplayPic(defaultProfileData.DisplayPic); SetGreeting(defaultProfileData.Greeting); } }
private void LoginCallback(bool _success, DatabaseHandler.ErrorResult _message) { bLoginInProgress = false; UICanvas.Get().TurnOffDarkenator(); if (_success) { Debug.Log("Login Success"); PanelManager.Get().ChangePanels(EGameScreens.GS_MainMenu); } }
//Show profile private void ViewProfileRetrieved(bool _success, DatabaseHandler.ErrorResult _error, NameValueCollection _collection) { UICanvas.Get().TurnOffDarkenator(); if (_success) { UIViewProfile profileView = PanelManager.Get().GetScreen(EGameScreens.GS_ViewProfile).PanelContent.GetComponent <UIViewProfile>(); if (profileView) { profileView.SetProfile(new ProfileData(_collection)); PanelManager.Get().ShowPanel(EGameScreens.GS_ViewProfile); } } }
private void RetrievedFriends(bool _success, DatabaseHandler.ErrorResult _error, NameValueCollection _collection) { if (!_success) { return; } ClearFriendsList(); int index = 0; while (_collection.DoesValueExist("Pending" + index)) { UIFriendEntry entry = Instantiate(FriendEntryPrefab, PendingRoot.transform).GetComponent <UIFriendEntry>(); entry.Init(_collection.GetString("Pending" + index), EFriendRequestType.FRT_Pending, this); index++; } index = 0; while (_collection.DoesValueExist("Unaccepted" + index)) { UIFriendEntry entry = Instantiate(FriendEntryPrefab, UnacceptedRoot.transform).GetComponent <UIFriendEntry>(); entry.Init(_collection.GetString("Unaccepted" + index), EFriendRequestType.FRT_Unaccepted, this); index++; } index = 0; while (_collection.DoesValueExist("Friends" + index)) { UIFriendEntry entry = Instantiate(FriendEntryPrefab, FriendsRoot.transform).GetComponent <UIFriendEntry>(); entry.Init(_collection.GetString("Friends" + index), EFriendRequestType.FRT_Friend, this); index++; } cachedFriendsList = _collection; }
void ScorePosted(bool _success, DatabaseHandler.ErrorResult _error) { ReturnToMenu(); }