static void updateCoins()
    {
        UpgradeMenuLocalize upgradeLocalize = GameObject.FindGameObjectWithTag("VehicleUpgradeMenu").GetComponent <UpgradeMenuLocalize>() as UpgradeMenuLocalize;

        upgradeLocalize.updateCoions();
    }
    public void PurchaseProductResult(string package, bool result)
    {
        if (result)
        {
            if (menuType == 2)
            {
                if (!package.Equals(ConstantsNew.PACKAGE_VGP))
                {
                    StoreMenuLocalize storeLocalize = GameObject.FindGameObjectWithTag("StoreMenu").GetComponent <StoreMenuLocalize>() as StoreMenuLocalize;
                    storeLocalize.updateCoions();
                }
                switch (GameManager.Instance.GetPreviousGameState())
                {
                case GameManager.GameState.MAINMENU:
                {
                    Debug.Log("Upadating vehicle coins count");
                    VehicleSelectionMenuLocalize vehicleLocalize = GameObject.FindGameObjectWithTag("VehicleSelectionMenu").GetComponent <VehicleSelectionMenuLocalize>() as VehicleSelectionMenuLocalize;
                    vehicleLocalize.updateCoions();
                    if (package.Equals(ConstantsNew.PACKAGE_VGP))
                    {
                                                #if UNITY_IPHONE
                        VehicleSelectionMenuListenerNew vehicleMenu = GameObject.Find("Vehicle1").GetComponent <VehicleSelectionMenuListenerNew>() as VehicleSelectionMenuListenerNew;
                        vehicleMenu.playHavenIAPTracker(package);
                                                #endif
                    }
                    break;
                }

                case GameManager.GameState.EPISODEMENU:
                {
                    Debug.Log("Upadating episode coins count");
                    EpisodeMenuLocalize episodeLocalize = GameObject.FindGameObjectWithTag("EpisodeMenu").GetComponent <EpisodeMenuLocalize>() as EpisodeMenuLocalize;
                    episodeLocalize.updateCoions();
                    break;
                }

                case GameManager.GameState.VEHICLEUPGRADEMENU:
                {
                    Debug.Log("Upadating upgrade coins count");
                    UpgradeMenuLocalize upgradeLocalize = GameObject.FindGameObjectWithTag("VehicleUpgradeMenu").GetComponent <UpgradeMenuLocalize>() as UpgradeMenuLocalize;
                    upgradeLocalize.updateCoions();
                    break;
                }

                case GameManager.GameState.LEVELSETTINGS:
                {
                    Debug.Log("Upadating settings coins count");
                    SettingsMenuLocalize settingsLocalize = GameObject.FindGameObjectWithTag("LevelSettings").GetComponent <SettingsMenuLocalize>() as SettingsMenuLocalize;
                    settingsLocalize.updateCoions();
                    break;
                }
                }
                Debug.Log("enter in purchase " + "thank you called.");
                Instantiate(Resources.Load("SubMenusNew/LevelThankyou"));
            }
            else
            {
                switch (GameManager.Instance.GetCurrentGameState())
                {
                case GameManager.GameState.STORE:
                {
                    Debug.Log("enter in purchase " + "store");
                    GameObject.FindGameObjectWithTag("Store").GetComponent <StoreMenuListener>().Unlock(package);
                    break;
                }

                case GameManager.GameState.VEHICLESELECTIONMENU:
                {
                    Debug.Log("enter in purchase " + "vehic");
                    GameObject.FindGameObjectWithTag("TruckMenuPanel").GetComponent <VehicleSelectionDragScript>().UnLockAllVehicles( );
                    break;
                }

                case GameManager.GameState.EPISODEMENU:
                {
                    Debug.Log("enter in purchase " + "episdoe");
                    GameObject.FindGameObjectWithTag("CarouselMenu").GetComponent <CarouselEventListener>().UnLockAllEpisodes();
                    break;
                }
                }
                Debug.Log("enter in purchase " + "thank you called.");
                //	GameManager.Instance.ChangeState(GameManager.GameState.THANKYOU);
                Instantiate(Resources.Load("SubMenus/LevelThankyou"));
            }
        }
    }