private void OnRegisterGuestSuccess(AddUsernamePasswordResult result) { playerDataSaver.SetUsername(username); playerDataSaver.SetEmail(email); playerDataSaver.SetPassword(password); PlayFabClientAPI.UpdateUserTitleDisplayName( new UpdateUserTitleDisplayNameRequest { DisplayName = username }, resultSuccess => { Debug.Log(username + " is the Display Name"); }, error => { Debug.LogError(error.GenerateErrorReport()); if (currentBuildLevel == 0) { success.OpenWindow(); StartCoroutine(LoggingProcessSucceeded()); } }); playerDataSaver.SetCountry(countryDropdown.selectedText.text); playerDataSaver.SetAvatar(avatarDropdown.selectedText.text); SetPlayerData(); playerDataSaver.SetIsGuest(0); success.OpenWindow(); }
public void ShowWinner(string winnerName, string loserName) { playerWinPopUp.OpenWindow(); playerWinPopUp.windowTitle.text = "Fin de jeu"; playerWinPopUp.windowDescription.text = "Gagnant : " + winnerName + "\n" + "Perdant : " + loserName; }
public void CheckGame(ModalWindowManager window) { if (player1Name.text.Length <= 0) { response.text = "Le joueur 1 n'a pas saisi de nom"; response.color = Color.green; } else if (player2Name.text.Length <= 0) { response.text = "Le joueur 2 n'a pas saisi de nom"; response.color = Color.green; } else if (player1Name.text.Equals(player2Name.text)) { response.text = "Les joueurs ne peuvent pas avoir les mêmes noms"; response.color = Color.green; } else if (player1Color.index.Equals(player2Color.index)) { response.text = "Les joueurs ne peuvent pas avoir les mêmes couleurs"; response.color = Color.green; } else { window.OpenWindow(); } }
public virtual void Open() { visible = true; InputHandler.Instance.OnEscPressed += OnEscPressed; InputHandler.Instance.OnEnterPressed += OnEnterPressed; windowManager.OpenWindow(); }
private void Start() { canvas = GetComponent <Canvas>(); canvas.sortingOrder = 20; splashModalWindow.gameObject.SetActive(true); splashModalWindow.OpenWindow(); quitModalWindow.gameObject.SetActive(false); }
private void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { canvas.sortingOrder = 20; quitModalWindow.gameObject.SetActive(true); quitModalWindow.OpenWindow(); } }
/// <summary> /// Checks if the game is done /// </summary> private void CheckIfGameIsDone() { if (_playersFinished >= _nrOfPlayersAtGameStart) { isGameDone = true; GUIEvents.current.OnGameDoneNotify(); endScreen.OpenWindow(); } }
private void OpenModal(ModalWindowManager modalWindow, string title, string message) { modalWindow.CloseWindow(); modalWindow.titleText = title; modalWindow.descriptionText = message; modalWindow.UpdateUI(); modalWindow.OpenWindow(); }
private IEnumerator LoggingProcessSucceeded() { success.OpenWindow(); yield return(new WaitForSeconds(2f)); if (success.isActiveAndEnabled) { AsyncOperation operation = SceneManager.LoadSceneAsync(1); while (!operation.isDone) { yield return(null); } } }
// Start is called before the first frame update void Start() { if (PlayerPrefs.GetInt("Screen", 1) == 0) { Screen.SetResolution(1920, 1080, false); PlayerPrefs.SetInt("Screen", 0); } else { Screen.SetResolution(1920, 1080, true); PlayerPrefs.SetInt("Screen", 1); } Modal.OpenWindow(); }
public void OnOAuthInputSelected() { SoundManager.instance.Play(OnInputSelectedSoundArg); if (_oauthInputSelectedFirstTime) { _oauthInputSelectedFirstTime = false; OAuthInputField.text = DefaultOAuth; } if (!_oauthAuthenticationConfirmed) { OAuthModalWindow.OpenWindow(); } }
private void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { if (_open) { exitWindow.CloseWindow(); _open = false; } else { exitWindow.OpenWindow(); _open = true; } } }
public void ShowTips() { tipsWindow.OpenWindow(); tipsWindow.titleText = "Aides"; tipsWindow.descriptionText = "Chaque joueur a son buzzer, peint avec sa couleur.\n" + "En cas de mauvais buzz le joueur perd " + Runtime.lostOnFail + "pts\n" + "En cas de buzz inutile, le joueur perd " + Runtime.lostOnRubish + "pts\n" + "Joker $ : L'opposant perd " + Runtime.lostOnFail + "pts\n" + "Joker % : L'opposant perd " + Runtime.lostOnRubish + "pts\n" + "Joker ? : L'opposant perd " + Runtime.lostOnFail + "pts et le joueur gagne " + Runtime.lostOnFail + "pts\n" + "Joker ! : L'opposant perd " + Runtime.lostOnRubish + "pts et le joueur gagne " + Runtime.lostOnRubish + "pts\n"; tipsWindow.UpdateUI(); tipsShowed = true; }
private void Update() { #if UNITY_ANDROID if (Input.GetKeyDown(KeyCode.Escape)) { if (SceneManager.GetActiveScene().name.Equals("Lobby")) { exitModalWindow.OpenWindow(); } else { if (GameManager.Instance.State == GameManager.GameState.Play) { menuModalWindow.OpenWindow(); IsMenuOpen = true; } } } #endif }
public void ClickAction() { modalWindowManager.OpenWindow(); }
private void EndGame() { endGameWindow.OpenWindow(); isEndGame = true; }
private void ShowErrorConnectionWindow() { _errorConnectionWindow.OpenWindow(); _uiController.ErrorConnectionWindow = false; }
private void ShowLoginDecline() { _declineLoginInput.OpenWindow(); _uiController.DeclineLoginWindow = false; }
private void ShowVoteDecline() { _declineWindow.OpenWindow(); _uiController.DeclineWindow = false; }
private void ShowVoteAccept() { _acceptWindow.OpenWindow(); _uiController.VoteAcceptanceWindow = false; }
public void FocusWindowChanged() { LeaderboardManager.OnDataRetrieved += CloseWindow; gettingDataMessage.OpenWindow(); }