예제 #1
0
    void Init()
    {
        inappsList = GetComponent <ConfigManager>().shopInApps;
        features   = GetComponent <ConfigManager>().shopFeatures;

        string androidKey = Info.androidKey;

        IAP.init(androidKey);
        //Debug.Log("Started IAP");

        List <string> androidList = new List <string>();
        List <string> appleList   = new List <string>();

        for (int i = 0; i < inappsList.Length; i++)
        {
            androidList.Add(inappsList[i].androidBundle);
            appleList.Add(inappsList[i].appleBundle);
        }

        string[] androidProductIDs = androidList.ToArray();
        string[] iosProductIds     = appleList.ToArray();

        //foreach(string a in iosProductIds) Debug.Log("produto: "+a);

        IAP.requestProductData(iosProductIds, androidProductIDs, productList =>
        {
            /*foreach(IAPProduct prod in productList)
             * {
             *      Debug.Log("IAP: "+prod.productId);
             * }*/
            Debug.Log("product list received");
            //Utils.logObject(productList);
        });
    }
예제 #2
0
	void Init()
	{
		inappsList = GetComponent<ConfigManager>().shopInApps;
		features = GetComponent<ConfigManager>().shopFeatures;
		
		string androidKey = Info.androidKey;
		IAP.init (androidKey);	
		//Debug.Log("Started IAP");
		
		List<string> androidList = new List<string>();
		List<string> appleList = new List<string>();
		
		for(int i = 0 ; i < inappsList.Length ; i++)
		{
			androidList.Add(inappsList[i].androidBundle);
			appleList.Add(inappsList[i].appleBundle);
		}
		
		string[] androidProductIDs = androidList.ToArray();
		string[] iosProductIds = appleList.ToArray();
		
		//foreach(string a in iosProductIds) Debug.Log("produto: "+a);
		
		IAP.requestProductData(iosProductIds,androidProductIDs, productList => 
		{
			/*foreach(IAPProduct prod in productList)
			{
				Debug.Log("IAP: "+prod.productId);
			}*/
			Debug.Log("product list received"); 
			//Utils.logObject(productList);
		});
	}
예제 #3
0
 void Start()
 {
     inappsList = GetComponent <ConfigManager>().shopInApps;
     features   = GetComponent <ConfigManager>().shopFeatures;
 }
예제 #4
0
	void Start()
	{
		inappsList = GetComponent<ConfigManager>().shopInApps;
		features = GetComponent<ConfigManager>().shopFeatures;
	}