Exemple #1
0
 public void ShowToastPressed()
 {
     text.text = "Show Toast Pressed";
     Debug.Log("Show Toast Pressed");
     // Toasts.
     Toasts.ShowToast(ToastTemplateType.ToastText01, new string[] { "toasting to good life." }, null);
 }
        private void SendSampleToastExecute(object obj)
        {
            Notification n = new Notification();

            n.Type = "EXAMPLE";
            n.Date = 0;
            n.Link = "http:\\google.com";

            Toasts.ShowToast(n);
        }
Exemple #3
0
    //Makes the background grow redder if you lose. Enter lose screen.
    IEnumerator ChangeLight()
    {
#if UNITY_WSA_10_0 && NETFX_CORE
        Toasts.ShowToast(ToastTemplateType.ToastImageAndText01, new string[] { "Try again! Your score was: " + gameController.getScore() }, "Assets/StoreLogo.scale-400.png");
#endif
        GameObject light           = GameObject.FindGameObjectWithTag("Light");
        Light      backgroundLight = light.GetComponent <Light>();
        while (backgroundLight.color.b > 0 && backgroundLight.color.g > 0)
        {
            backgroundLight.color = new Color(backgroundLight.color.r, backgroundLight.color.b - .10f, backgroundLight.color.g - .10f);
            yield return(new WaitForSeconds(.05f));
        }
        gameController.done = true;
        gameController.over = false;
        gameController.Reset();
        SceneManager.LoadScene("Game_Over");
    }
    IEnumerator WinGame()
    {
        //Pop up a notification of score for Win10 devices
#if UNITY_WSA_10_0 && NETFX_CORE
        if (!calledthenotif)
        {
            Toasts.ShowToast(ToastTemplateType.ToastImageAndText01, new string[] { "Congratulations! Your score was: " + score }, "Assets/StoreLogo.scale-400.png");
        }
#endif

        calledthenotif = true;

        //Enter win scenario
        GameObject light           = GameObject.FindGameObjectWithTag("Light");
        Light      backgroundLight = light.GetComponent <Light>();
        while (backgroundLight.intensity < 7)
        {
            backgroundLight.intensity += .04f;
            yield return(new WaitForSeconds(.4f));
        }
        over = false;
        Reset();
        SceneManager.LoadScene("Win Screen");
    }