コード例 #1
0
    public void Start()
    {
        AdManager20.RequestBannner(AdSize.Banner, AdPosition.Bottom);

        if (GameModes.TimeAttack)
        {
            textBoxHighScore.text = PlayerPrefs.GetInt("HighScoreTimeattack").ToString();
            textboxScore.text     = PlayerPrefs.GetInt("ScoreTimeattack").ToString();
            textboxGamemode.text  = "(Time Attack)";
            //panel.GetComponent<Image>().sprite = fundalFaraTimp;
        }
        else if (GameModes.Hardcore)
        {
            textBoxHighScore.text = PlayerPrefs.GetInt("HighScoreHardcore").ToString();
            textboxScore.text     = PlayerPrefs.GetInt("ScoreHardcore").ToString();
            textboxGamemode.text  = "(Hardcore)";
        }
        else
        {
            textBoxHighScore.text = PlayerPrefs.GetInt("HighScore").ToString();
            textboxScore.text     = PlayerPrefs.GetInt("Score").ToString();
            textboxGamemode.text  = "(Clasic)";
        }

        textboxEuroi.text = PlayerPrefs.GetInt("castig").ToString();

        if (PlayerPrefs.GetInt("FaraTimp", 0) == 1)
        {
            panel.GetComponent <Image>().sprite = fundalFaraTimp;
        }
        //euroi = PlayerPrefs.GetInt("euroi");
        //PlayerPrefs.SetInt("euroiinitial", euroi);
    }
コード例 #2
0
ファイル: Creier.cs プロジェクト: VladSecatureanu/quiz-game
    public void ButtonPause_OnClick()
    {
        AdManager20.ShouldBannerBeOn = true;
        AdManager20.RequestBannner(AdSize.Banner, AdPosition.Bottom);
        GetEuroi();
        if (!HasItem("pauze"))
        {
            if (euroi >= costPause)
            {
                ScadeEuroi(costPause);
            }
            else
            {
                return;
            }
        }
        fundalPauzaRosie.SetActive(true);
        buttonPauza.enabled = false;
        panelPauza.SetActive(true);
        Time.timeScale = 0;
        //panel

        if (PlayerPrefs.GetInt("pauze") > 0)
        {
            numarPauze.text = PlayerPrefs.GetInt("pauze").ToString();
        }
        else
        {
            numarPauze.text         = (costPause).ToString();
            ImaginiEuroi[0].enabled = true;
        }
    }
コード例 #3
0
 public void ResumeAnimation()
 {
     Negru.GetComponent <Image>().enabled       = true;
     Negru.GetComponent <Animator>().speed      = 1;
     Negru.GetComponent <Image>().raycastTarget = true;
     Destroy(Warning, 1);
     Destroy(Negru, 2.50f);
     AdManager20.RequestBannner(AdSize.Banner, AdPosition.Bottom);
 }
コード例 #4
0
    //bool VideoRequested = false;
    public void Start()
    {
        AdManager20.Start();
        //return;


        if (!IsPanouWarningTriggered)
        {
            Debug.Log(1);
            Negru.SetActive(true);
            Warning.SetActive(true);
            //Destroy(Warning, 2);
            //Destroy(Negru, 6);
            Invoke("PauseAnimation", 2);

            IsPanouWarningTriggered = true;
        }
        else
        {
            if (!AdManager20.ShowBanner())
            {
                AdManager20.RequestBannner(AdSize.Banner, AdPosition.Bottom);
            }
        }
        long clickTime = long.Parse(PlayerPrefs.GetString("cooldown", "0"));

        if (clickTime > 0)
        {
            cooldown     = new DateTime(clickTime);
            cooldownTime = cooldown.Subtract(DateTimeOffset.Now);
            if (cooldownTime.TotalSeconds <= 0)
            {
                //AdManager20.RequestRewardedVideo();
            }
        }
        else
        {
            //AdManager20.RequestRewardedVideo();
        }
        //AdManager20.RequestBannner(AdSize.SmartBanner, AdPosition.Bottom);
        PanelVizionare.SetActive(false);
        textboxEuroi.text           = PlayerPrefs.GetInt("euroi", 0).ToString();
        textboxCooldown.text        = "";
        RoseataCastigaEuroi.enabled = false;
        textboxConexiune.enabled    = false;

        if (!Social.localUser.authenticated)
        {
            StartGooglePlayServices();
            FirstSignIn();
        }
        //PlayerPrefs.SetString("cooldown", "0");
        //PlayerPrefs.SetInt("euroi", 9999999);
    }
コード例 #5
0
    IEnumerator BannerAfterSecs(float time)
    {
        yield return(new WaitForSeconds(time));

        AdManager20.RequestBannner(AdSize.Banner, AdPosition.Bottom);
    }