public void LoadNextLevel() { SoundEngine.instance.PlaySound(SoundEngine.instance.audioClick); callback = PrepareNextWord; StartCoroutine(ClosePopup(GetComponent <Game>().screenWin.GetComponent <Animator>())); }
public void ShowPopup(string message, ConfirmationCallback callback) { if (!Container.activeSelf) { Container.SetActive(true); MessageContainer.GetComponent <Text>().text = message; // If callback is null, then just show the accept button if (callback != null) { ConfirmCallback += callback; // Re-enable cancel button and move confirm button back to it's correct position CancelButton.SetActive(true); ConfirmButton.transform.position = ConfirmPosition; } else { // Disable cancel button and move confirm to center CancelButton.SetActive(false); ConfirmButton.GetComponent <RectTransform>().position = new Vector3( ConfirmPosition.x + 45f, ConfirmButton.transform.position.y, ConfirmButton.transform.position.z ); } } else { Debug.Log("There is already a popup"); } }
public void RestartGame() { SoundEngine.instance.PlaySound(SoundEngine.instance.audioClick); confirmation.GetComponent <ScreenConfirmation>().ChangeText(PlayerPrefs.GetString("lang") == "In" ? "Apahkah anda pasti, mencoba kembali kata ini?" : "Are you sure you want to re-try this word?"); callback = RestartCurrentLevel; }
public void Cancel() { SoundEngine.instance.PlaySound(SoundEngine.instance.audioClick); callback = DisablePopup; StartCoroutine(ClosePopup(confirmation.GetComponent <Animator>())); }
public void GoHome() { SoundEngine.instance.PlaySound(SoundEngine.instance.audioClick); confirmation.GetComponent <ScreenConfirmation>().ChangeText(PlayerPrefs.GetString("lang") == "In" ? "Apahkah anda pasti, mau kembali ke menu?" : "Are you sure you want to return to the menu?"); callback = LoadMainMenu; }
public void RestartGame() { SoundEngine.instance.PlaySound(SoundEngine.instance.audioClick); confirmation.GetComponent <ScreenConfirmation>().ChangeText(PlayerPrefs.GetString("lang") == "fr" ? "Es-tu sur de vouloir recommencer ce mot?" : "Are you sure you want to re-try this word?"); callback = RestartCurrentLevel; }
public void GoHome() { SoundEngine.instance.PlaySound(SoundEngine.instance.audioClick); confirmation.GetComponent <ScreenConfirmation>().ChangeText(PlayerPrefs.GetString("lang") == "fr" ? "Es-tu sur de vouloir retourner au menu?" : "Are you sure you want to return to the menu?"); callback = LoadMainMenu; }
private void _getConfirmationDetails(SteamWeb web, Confirmation conf, ConfirmationCallback callback) { string url = ApiEndpoints.COMMUNITY_BASE + "/mobileconf/details/" + conf.ID + "?"; this.GenerateConfirmationQueryParams(web, "details", queryString => { url += queryString; var cookies = new CookieContainer(); this.Session.AddCookies(cookies); this.GenerateConfirmationUrl(web, referer => { web.Request(url, "GET", null, cookies, (response, code) => { if (string.IsNullOrEmpty(response) || code != HttpStatusCode.OK) { callback(null); return; } var confResponse = JsonConvert.DeserializeObject <ConfirmationDetailsResponse>(response); callback(confResponse); }); }); }); }
public void Confirm([NotNull] ConfirmationCallback callback, [CanBeNull] object callbackParameter, [NotNull] string message, [NotNull] params object[] formatArgs) { if (callback == null) { throw new ArgumentNullException("callback"); } if (message == null) { throw new ArgumentNullException("message"); } if (formatArgs == null) { throw new ArgumentNullException("formatArgs"); } ConfirmCallback = callback; ConfirmParameter = callbackParameter; ConfirmRequestTime = DateTime.UtcNow; Message("{0} Type &H/ok&S to continue.", String.Format(message, formatArgs)); }