예제 #1
0
    // Change the currency balance text when the balance changed
    public void OnCurrencyBalanceChanged(VirtualCurrency vc, int balance, int amountAdded)
    {
        GameObject temp_1 = GameObject.Find("store_ui_gr");

        if (temp_1 != null)
        {
            store_manager_script = temp_1.GetComponent <SOAPStoreManager>();
        }

        store_manager_script.setStoreCoinText();
        store_manager_script.setGameOverCoinText();
        store_manager_script.setPauseCoinText();

        // Unlock achievement for accumulating coins
        #if UNITY_ANDROID
        if (balance >= 20000 && balance < 100000)
        {
            Achievements.forARainyDayAchievement();
        }

        if (balance > 100000)
        {
            Achievements.mustHaveThemAllAchievement();
        }
        #endif
    }
예제 #2
0
    // Activate the game over menu and update the coin balance text
    public void activate_game_over_menu()
    {
        cbads_script.showGameOverAds();
        game_over_menu.SetActive(true);
        pause_button.SetActive(false);
        game_screen_score_text.SetActive(false);
        store_manager_script.setGameOverCoinText();

        // Update the score texts
        point_manager_script.updateBestScoreText();
        point_manager_script.updateCurrentScoreText();

        go_play_btn = GameObject.Find("go_play_btn").GetComponent <Button>();
        go_play_btn.Select();
    }