예제 #1
0
//		/**********************
//		 Query Methods
//		 **********************/

        public static void GetVirtualCurrencies(VirtualCurrency.GetVirtualCurrencyArrayFinished callback)
        {
            if (javaUnityApplicasaIAP == null)
            {
                javaUnityApplicasaIAP = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaIAP");
            }
            Error error;

            error.Id      = 1;
            error.Message = "Success";

            AndroidJavaObject virtualCurrencyArrayJava = javaUnityApplicasaIAP.CallStatic <AndroidJavaObject>("ApplicasaIAPGetVirtualCurrenciesWithBlock");

            VirtualCurrency.VirtualCurrencyArray virtualCurrencyArray = new VirtualCurrency.VirtualCurrencyArray();

            virtualCurrencyArray.Array = virtualCurrencyArrayJava.GetRawObject();
            AndroidJavaObject[] convertedArray = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(virtualCurrencyArray.Array);
            int count = 0;

            for (int i = 0; i < convertedArray.Length; i++)
            {
                AndroidJavaObject[] temp = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(convertedArray[i].GetRawObject());
                count += temp.Length;
            }
            virtualCurrencyArray.ArraySize = count;
            convertedArray = null;

            callback(true, error, virtualCurrencyArray);
        }
예제 #2
0
 public static void GetVirtualCurrencies(VirtualCurrency.GetVirtualCurrencyArrayFinished callback)
 {
     ApplicasaIAPGetVirtualCurrenciesWithBlock(callback);
 }
예제 #3
0
 private static extern void ApplicasaIAPGetVirtualCurrenciesWithBlock(VirtualCurrency.GetVirtualCurrencyArrayFinished callback);
예제 #4
0
//		/**********************
//		 Query Methods
//		 **********************/

        public static void GetVirtualCurrencies(VirtualCurrency.GetVirtualCurrencyArrayFinished callback)
        {
            callback(true, new Error(), new VirtualCurrency.VirtualCurrencyArray());
        }