public void StartShop() { BeginType = PlayerPrefs.GetInt("NowType", 0); gameObject.SetActive(true); //Transform _go = MainScript.MainPanel.transform; //for (int i = 0; i < _go.transform.childCount; i++) // _go.GetChild(i).gameObject.SetActive(false); MainScript.MainPanel.SetActive(false); ShopObjects.SetActive(true); BuySetText.text = Lang.Phrase("Set"); Camera.main.GetComponent <Animator>().Play("CameraToShop"); CheckShop(PlayerPrefs.GetInt("NowType", 0), Resources.Load <GameObject>(PlayerPrefs.GetInt("NowType", 0).ToString())); SetShopObjects(); }
private void Awake() { Instance = this; // Listen to all events for illustration purposes OpenIABEventManager.billingSupportedEvent += billingSupportedEvent; OpenIABEventManager.billingNotSupportedEvent += billingNotSupportedEvent; OpenIABEventManager.queryInventorySucceededEvent += queryInventorySucceededEvent; OpenIABEventManager.queryInventoryFailedEvent += queryInventoryFailedEvent; OpenIABEventManager.purchaseSucceededEvent += OnPurchaseSucceded; OpenIABEventManager.purchaseFailedEvent += purchaseFailedEvent; OpenIABEventManager.consumePurchaseSucceededEvent += consumePurchaseSucceededEvent; OpenIABEventManager.consumePurchaseFailedEvent += consumePurchaseFailedEvent; DontDestroyOnLoad(this); }