예제 #1
0
    private void Update()
    {
        if (allCanvas.Count < counterAllModes)
        {
            SetAllCanvas();
        }


        //-----------------IMPORTANTISIMO-----------------------

        //DESCOMENTAR PARA LA BUILD

        if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer)
        {
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                StartCoroutine(DesactiveCanvas());
                if (!anyCanvasActive)
                {
                    if (SceneManager.GetActiveScene().name == "ModesMenu_Arte")
                    {
                        Application.Quit();
                    }
                    else
                    {
                        TextManager tm     = FindObjectOfType <TextManager>();
                        int         clicks = tm.clicks;

                        Dictionary <string, object> dictionary = new Dictionary <string, object>();
                        dictionary.Add("clicks", clicks);

                        switch (SceneManager.GetActiveScene().name)
                        {
                        case "Cita3_Arte":
                            Analytics.CustomEvent("quit_cita3", dictionary);
                            break;

                        case "Letras_Arte":
                            Analytics.CustomEvent("quit_letras", dictionary);
                            break;

                        case "Mimica_Arte":
                            Analytics.CustomEvent("quit_mimica", dictionary);
                            break;

                        case "Quien_Arte":
                            Analytics.CustomEvent("quit_quien", dictionary);
                            break;

                        case "Retos_Arte":
                            Analytics.CustomEvent("quit_retos", dictionary);
                            break;

                        case "Tabu_Arte":
                            Analytics.CustomEvent("quit_tabu", dictionary);
                            break;

                        case "YoNunca_Arte":
                            Analytics.CustomEvent("quit_yonunca", dictionary);
                            break;
                        }
                        SceneManager.LoadScene("ModesMenu_Arte");
                    }
                }
                else
                {
                    anyCanvasActive      = false;
                    activecanvas.enabled = false;
                }
            }
        }

#if UNITY_ANDROID
        if (!IARshowed)
        {
            if (IARcounter < IARseconds)
            {
                IARcounter += Time.deltaTime;
            }
            else
            {
                ShowReview();
                IARshowed = true;
            }
        }
#endif

#if UNITY_IOS
        if (!IARshowed)
        {
            if (IARcounter < IARseconds)
            {
                IARcounter += Time.deltaTime;
            }
            else
            {
                NativeReviewRequest.RequestReview();
                IARshowed = true;
            }
        }
#endif
    }
예제 #2
0
 public void OnDialogPopUp()
 {
     NativeReviewRequest.RequestReview();
 }