예제 #1
0
    // Use this for initialization
    void Start()
    {
        hasDisplayed    = false;
        roundScore.text = "Score " + Score.currentScore.ToString();
        highScore.text  = "High Score: " + PlayerPrefs.GetInt("highScore").ToString();
        //Chartboost.Create ();

        Chartboost.setAutoCacheAds(true);

        if (!SoomlaStore.Initialized)
        {
            SoomlaStore.Initialize(new Soomla.Store.GalaxyDefender.GalaxyDefenderAssets());
            SoomlaStore.RefreshInventory();
        }

        ItemBalance = StoreInventory.GetItemBalance("no_ads");

        if (ItemBalance > 0)
        {
            showAd = false;
        }
        else
        {
            showAd = true;
        }

        if (Score.currentScore >= 10000)
        {
            Social.ReportProgress("CgkIl_fbqZ4MEAIQAQ", 100.0f, (bool success) => { });
        }
        if (Score.currentScore >= 100000)
        {
            Social.ReportProgress("CgkIl_fbqZ4MEAIQAg", 100.0f, (bool success) => { });
        }
        if (Score.currentScore >= 250000)
        {
            Social.ReportProgress("CgkIl_fbqZ4MEAIQAw", 100.0f, (bool success) => { });
        }
        if (Score.currentScore >= 500000)
        {
            Social.ReportProgress("CgkIl_fbqZ4MEAIQBA", 100.0f, (bool success) => { });
        }
        if (Score.currentScore >= 1000000)
        {
            Social.ReportProgress("CgkIl_fbqZ4MEAIQBQ", 100.0f, (bool success) => { });
        }
        if (Score.currentScore >= 5000000)
        {
            Social.ReportProgress("CgkIl_fbqZ4MEAIQBw", 100.0f, (bool success) => { });
        }

        Social.ReportScore(Score.currentScore, "CgkIl_fbqZ4MEAIQBg", (bool success) => { });
    }