Esempio n. 1
0
    void Awake()
    {
        Time.timeScale = 1;
        //AppController.chartBoostMainMenu = true;

        BF_gamePlayed.text      = PrefsManager.GetBottleFlipGameCount().ToString();
        BF_SuccessfullFlip.text = PrefsManager.GetTotalSuccessFullFlips().ToString();  //bottleflip SuccessfullFlip
        BF_Distance.text        = PrefsManager.GetHighestDistance().ToString();        //bottleflip Distance

        DTB_gamePlayed.text      = PrefsManager.GetDumpBottleGameCount().ToString();   //dump the bottle gameplay
        DTB_SuccessfullDump.text = PrefsManager.GetTotalSuccessFullDumps().ToString(); //dump the bottle SuccessfullDump
        this.TotalCoins.text     = PrefsManager.GetTotalCoins().ToString();
    }
Esempio n. 2
0
    void OnEnable()
    {
        if (this.CurrentSuccessfullFlips)
        {
            this.CurrentSuccessfullFlips.text = PrefsManager.GetCurrentBottleFlipsCount().ToString();
        }

        if (BestSuccessfullFlips)
        {
            this.BestSuccessfullFlips.text = PrefsManager.GetBestBottleFlipCount().ToString();
        }

        if (CurrentCoins)
        {
            this.CurrentCoins.text = PrefsManager.GetCurrentGamePlayCoins().ToString();
        }

        if (BestCoins)
        {
            this.BestCoins.text = PrefsManager.GetBestCoins().ToString();
        }

        if (CurrentDistance)
        {
            this.CurrentDistance.text = ((int)this.manager.TotalDistance).ToString() + "m";
        }

        if (BestDistance)
        {
            this.BestDistance.text = PrefsManager.GetHighestDistance().ToString() + "m";
        }

        if (TotalCoins)
        {
            this.TotalCoins.text = PrefsManager.GetTotalCoins().ToString();
        }

        if (this.BottleFlipCounts)
        {
            this.BottleFlipCounts.text = PrefsManager.GetBottleFlipGameCount().ToString();
        }

        if (this.DumpBottleCounts)
        {
            this.DumpBottleCounts.text = PrefsManager.GetDumpBottleGameCount().ToString();
        }
    }
Esempio n. 3
0
    public void GameOver()
    {
        if (PrefsManager.GetCurrentGamePlayCoins() > PrefsManager.GetBestCoins())
        {
            PrefsManager.SetBestCoins(PrefsManager.GetCurrentGamePlayCoins());
        }

        Debug.Log("Game Over");
        // PrefsManager.AddToTotalCoins();
        int HD = PrefsManager.GetHighestDistance();

        //if (this.TotalDistance > HD)
        //{
        //    PrefsManager.SetHighestDistance((int)this.TotalDistance);
        //    ///Debug.Log("Highest Distance: " + PrefsManager.GetHighestDistance().ToString());
        //    /// Put leaderboard client ID in place of CLIent ID here

        //    Social.ReportScore((int)(PlayerPrefs.GetInt("HighestDistance")), "Client ID here", (bool success) => {
        //    });
        //}
        this.uiHandler.GameOverPanel.SetActive(true);
    }