private void OKPanel() { PlatformDialog.SetButtonLabel(LanguageManager.Instance.GetTextValue("OK")); PlatformDialog.Show( LanguageManager.Instance.GetTextValue("Warning"), LanguageManager.Instance.GetTextValue("Restart"), PlatformDialog.Type.SubmitOnly, () => { Debug.Log("OK"); Application.Quit(); }, null ); }
public void MoneyHack() { PlatformDialog.SetButtonLabel(LanguageManager.Instance.GetTextValue("OK")); PlatformDialog.Show( "Money Hack", "Added 1000 Gold Thanks", PlatformDialog.Type.SubmitOnly, () => { PlayerPrefs.SetInt("CoinGold", PlayerPrefs.GetInt("CoinGold") + 1000); Debug.Log("OK"); }, null ); // handle success or failure }
void OnGUI() { if (GUILayout.Button("show dialog 1")) { PlatformDialog.SetButtonLabel("OK", "Cancel"); PlatformDialog.Show( "message", PlatformDialog.Type.OKCancel, () => { Debug.Log("OK"); }, () => { Debug.Log("Cancel"); } ); StartCoroutine(AutoClose()); } if (GUILayout.Button("show dialog 2")) { PlatformDialog.SetButtonLabel("Yes", "No"); PlatformDialog.Show( "title", "message", PlatformDialog.Type.OKCancel, () => { Debug.Log("Yes"); }, () => { Debug.Log("No"); } ); } if (GUILayout.Button("show dialog 3")) { PlatformDialog.SetButtonLabel("OK"); PlatformDialog.Show( "title", "message", PlatformDialog.Type.SubmitOnly, () => { Debug.Log("OK"); }, null ); } }
public void Sign() { Social.localUser.Authenticate((bool success) => { if (!success) { PlatformDialog.SetButtonLabel(LanguageManager.Instance.GetTextValue("OK")); PlatformDialog.Show( LanguageManager.Instance.GetTextValue("Warning"), LanguageManager.Instance.GetTextValue("Unable"), PlatformDialog.Type.SubmitOnly, () => { Debug.Log("OK"); }, null ); // handle success or failure } }); }
public void CloseApp() { PlatformDialog.SetButtonLabel(LanguageManager.Instance.GetTextValue("Yes"), LanguageManager.Instance.GetTextValue("No")); PlatformDialog.Show( LanguageManager.Instance.GetTextValue("Warning"), LanguageManager.Instance.GetTextValue("GoodPerson"), PlatformDialog.Type.OKCancel, () => { Debug.Log("Yes"); PlatformDialog.Dismiss(); }, () => { Debug.Log("No"); /*LocalNotification.SendRepeatingNotification(2, 15, 60, "Can you solve?", "Try and see :)", new Color32(0xff, 0x44, 0x44, 255),true,false,true); * sleepUntil = Time.time + 99999;*/ Debug.Log("Notification 2 Active"); Application.Quit(); } ); }