ShowPopup() public method

public ShowPopup ( ) : RevMobPopup,
return RevMobPopup,
示例#1
0
    void Start()
    {
        //PlayerPrefs.SetInt("record", 0);
                #if (UNITY_IPHONE && !UNITY_EDITOR)
        banner = (RevMobIOSBanner)revmob.CreateBanner();
        banner.Show();
        #endif

        if (PlayerPrefs.GetString("hasPlayedOnce").Equals("true"))
        {
            PlayerPrefs.SetString("hasPlayedOnce", "false");
                        #if (UNITY_IPHONE && !UNITY_EDITOR)
            revmob.ShowPopup();
                #endif
                        #if (UNITY_ANDROID && !UNITY_EDITOR)
            revmob.ShowPopup();
                        #endif
        }
        menuState = MenuState.Splash;
        Instantiate(music, transform.position, transform.rotation);
        recordBlinkTimer = Time.time;
        PlayerPrefs.SetInt("currentScore", 0);

        StartCoroutine(utilities.GetRanking());

        if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer)
        {
            clickToPlayString = "tap to play!";
            tutorialString    = "Score points by matching 3+ similar memes before the time runs out. Move them around with touch!\nStart!";
            //clickToPlayString = "toque para jogar!";
            //tutorialString = "Pontue combinando 3+ memes iguais antes que acabe seu tempo. Mexa os memes arrastando e soltando.\nok!";
        }
        else
        {
            clickToPlayString = "tap to play!";
            tutorialString    = "Score points by matching 3+ similar memes before the time runs out. Move them around with touch!\nStart!";
            //clickToPlayString = "clique para jogar!";
            //tutorialString = "Pontue combinando 3+ memes iguais antes que acabe seu tempo. Mexa os memes clicando para selecionar.\nok!";
        }
    }
    // Mostra o popup
    public override bool showPopup()
    {
        try
        {
            if (Info.IsEditor() || (firstTime && !Setup()))
            {
                return(false);
            }

            instance.ShowPopup();
            return(true);
        }
        catch
        {
            return(Error(API, ERROR_TRY_SHOW_POPUP));
        }
    }