Ejemplo n.º 1
0
    void Start()
    {
        iapManager = GameObject.Find("IapManager").GetComponent <IapManager>();

        if (iapManager != null)
        {
            Debug.Log("[HMSPlugin]: adding listener ");
            iapManager.addListener(activateProducts);
        }
        else
        {
            Debug.Log("[HMSPlugin]: NO IAP MANAGER IN SHOP");
        }

        coinsText   = GameObject.Find("CoinsText").GetComponent <Text>();
        userText    = GameObject.Find("UserText").GetComponent <Text>();
        loginButton = GameObject.Find("LoginButton").GetComponent <Button>();
        shopItemsGO = GameObject.Find("ShopItems");


        if (!logged)
        {
            userText.text = "not logged";
        }
    }
Ejemplo n.º 2
0
 private void SignedIn(AuthHuaweiId authHuaweiId)
 {
     Debug.Log("[HMS]: SignedIn");
     iapManager = GetComponent <IapManager>();
     iapManager.OnCheckIapAvailabilitySuccess = LoadStore;
     iapManager.OnCheckIapAvailabilityFailure = (error) =>
     {
         Debug.Log($"[HMSPlugin]: IAP check failed. {error.Message}");
     };
     iapManager.CheckIapAvailability();
 }
Ejemplo n.º 3
0
 // Start is called before the first frame update
 /// <summary>
 ///
 /// </summary>
 void Start()
 {
     Debug.Log($"[HMSPlugin]: IAP checkxxxx");
     iapManager = GetComponent <IapManager>();
     iapManager.OnCheckIapAvailabilitySuccess = LoadStore;
     iapManager.OnCheckIapAvailabilityFailure = (error) =>
     {
         Debug.Log($"[HMSPlugin]: IAP check failed. {error.Message}");
     };
     iapManager.CheckIapAvailability();
     Debug.Log($"[HMSPlugin]: IAP checkxxxx2");
 }
Ejemplo n.º 4
0
    private void Start()
    {
        iapManager = GameObject.Find("IapManager").GetComponent <IapManager>();

        img       = transform.Find("ItemImage").GetComponent <Image>();
        nameText  = transform.Find("ItemName").GetComponent <Text>();
        priceText = transform.Find("ItemCost").GetComponent <Text>();
        descText  = transform.Find("ItemDesc").GetComponent <Text>();

        img.sprite = itemImage;

        nameText.text  = "";
        priceText.text = "";
        descText.text  = "";

        update = false;
    }