Esempio n. 1
0
        public static void GetVirtualGoods(VirtualGoodType type, VirtualGoodCategory virtualGoodCategory, VirtualGood.GetVirtualGoodArrayFinished callback)
        {
            if (javaUnityApplicasaIAP == null)
            {
                javaUnityApplicasaIAP = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaIAP");
            }
            Error error;

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

            AndroidJavaObject virtualGoodArrayJava = javaUnityApplicasaIAP.CallStatic <AndroidJavaObject>("ApplicasaIAPGetVirtualGoodsOfTypeAndCategory", (int)type, virtualGoodCategory.innerVirtualGoodCategoryJavaObject);

            VirtualGood.VirtualGoodArray virtualGoodArray = new VirtualGood.VirtualGoodArray();

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

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

            callback(true, error, virtualGoodArray);
        }
Esempio n. 2
0
        public static VirtualGoodCategory[] GetArrayWithQuerySync(Query query, QueryKind queryKind)
        {
            if (javaUnityApplicasaVirtualGoodCategory == null)
            {
                javaUnityApplicasaVirtualGoodCategory = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaVirtualGoodCategory");
            }

            AndroidJavaObject[] bigArray = javaUnityApplicasaVirtualGoodCategory.CallStatic <AndroidJavaObject[]>("ApplicasaVirtualGoodCategoryGetArrayWithQuerySync", query.innerQueryJavaObject, (int)queryKind);

            VirtualGoodCategory[] virtualGoodCategoryInner = null;
            for (int i = 0; i < bigArray.Length; i++)
            {
                AndroidJavaObject tempJavaObject = bigArray[i];

                AndroidJavaObject[]   InnerArray = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(tempJavaObject.GetRawObject());
                VirtualGoodCategory[] virtualGoodCategorytemp = new VirtualGoodCategory[InnerArray.Length];
                for (int j = 0; j < InnerArray.Length; j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    virtualGoodCategorytemp[j] = new VirtualGoodCategory(tempObj.GetRawObject(), tempObj);
                }
                if (virtualGoodCategoryInner == null)
                {
                    virtualGoodCategoryInner = virtualGoodCategorytemp;
                }
                else
                {
                    VirtualGoodCategory[] firstOne = virtualGoodCategoryInner;
                    virtualGoodCategoryInner = new VirtualGoodCategory[firstOne.Length + virtualGoodCategorytemp.Length];
                    firstOne.CopyTo(virtualGoodCategoryInner, 0);
                    virtualGoodCategorytemp.CopyTo(virtualGoodCategoryInner, firstOne.Length);
                }
            }
            return(virtualGoodCategoryInner);
        }
Esempio n. 3
0
        public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind)
        {
            yield return(new WaitForSeconds(0.2f));

            VirtualGoodCategory[] virtualGoodCategoryInner = new VirtualGoodCategory[0];
            finalVirtualGoodCategory = virtualGoodCategoryInner;
        }
Esempio n. 4
0
        public static IEnumerator GetVirtualGoodCategoryArrayIEnumerator(VirtualGoodCategoryArray virtualGoodCategoryArray)
        {
            yield return(new WaitForSeconds(0.2f));

            VirtualGoodCategory[] virtualGoodCategoryInner = new VirtualGoodCategory[0];
            finalVirtualGoodCategory = virtualGoodCategoryInner;
        }
Esempio n. 5
0
        public static VirtualGoodCategory[] GetVirtualGoodCategoryArray(VirtualGoodCategoryArray virtualGoodCategoryArray)
        {
            VirtualGoodCategory[] virtualGoodCategorys = new VirtualGoodCategory[virtualGoodCategoryArray.ArraySize];

            for (int i = 0; i < virtualGoodCategoryArray.ArraySize; i++)
            {
                IntPtr newPtr = Marshal.ReadIntPtr(virtualGoodCategoryArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
                virtualGoodCategorys[i] = new VirtualGoodCategory(newPtr);
            }
            return(virtualGoodCategorys);
        }
Esempio n. 6
0
        public static void GetVirtualGoods(VirtualGoodType type, VirtualGoodCategory virtualGoodCategory, GetVirtualGoodArrayFinished callback)
        {
            if (javaUnityApplicasaVirtualGood == null)
            {
                javaUnityApplicasaVirtualGood = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaVirtualGood");
            }
            int uniqueActionID = Core.currentCallbackID;

            Core.currentCallbackID++;
            setGetVirtualGoodArrayFinished(callback, uniqueActionID);
            javaUnityApplicasaVirtualGood.CallStatic("ApplicasaVirtualGoodsGetVirtualGoodsOfTypeAndCategory", (int)type, virtualGoodCategory.innerVirtualGoodCategoryJavaObject, uniqueActionID);
        }
 public static VirtualGoodCategory[] GetVirtualGoodCategoryArray(VirtualGoodCategoryArray virtualGoodCategoryArray)
 {
     VirtualGoodCategory[] virtualGoodCategory = new VirtualGoodCategory[virtualGoodCategoryArray.ArraySize];
     #if UNITY_ANDROID
     AndroidJavaObject tempJavaObjectArray=new AndroidJavaObject(virtualGoodCategoryArray.Array);
     #endif
     for (int i=0; i < virtualGoodCategoryArray.ArraySize; i++) {
     #if UNITY_IPHONE
         IntPtr newPtr = Marshal.ReadIntPtr (virtualGoodCategoryArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
         virtualGoodCategory[i] = new VirtualGoodCategory(newPtr);
     #endif
     #if UNITY_ANDROID
         AndroidJavaObject tempJavaObject = tempJavaObjectArray.Call<AndroidJavaObject>("get",i);
         IntPtr newPtr = AndroidJNI.NewGlobalRef(tempJavaObject.GetRawObject());
         virtualGoodCategory[i] = new VirtualGoodCategory(newPtr, new AndroidJavaObject(newPtr));
     #endif
     }
     return virtualGoodCategory;
 }
Esempio n. 8
0
        public static VirtualGoodCategory[] GetVirtualGoodCategoryArray(VirtualGoodCategoryArray virtualGoodCategoryArray)
        {
            VirtualGoodCategory[] virtualGoodCategoryInner = new VirtualGoodCategory[virtualGoodCategoryArray.ArraySize];
            AndroidJavaObject[]   bigArray = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(virtualGoodCategoryArray.Array);

            int count = 0;

            for (int i = 0; i < bigArray.Length; i++)
            {
                AndroidJavaObject   tempJavaObject = bigArray[i];
                AndroidJavaObject[] InnerArray     = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(tempJavaObject.GetRawObject());

                for (int j = 0; j < InnerArray.Length; j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    virtualGoodCategoryInner[count] = new VirtualGoodCategory(tempObj.GetRawObject(), tempObj);
                    count++;
                }
            }
            return(virtualGoodCategoryInner);
        }
Esempio n. 9
0
        public static IEnumerator GetVirtualGoodCategoryArrayIEnumerator(VirtualGoodCategoryArray virtualGoodCategoryArray)
        {
            VirtualGoodCategory[] virtualGoodCategoryInner = new VirtualGoodCategory[virtualGoodCategoryArray.ArraySize];
            AndroidJavaObject[]   bigArray = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(virtualGoodCategoryArray.Array);

            int count = 0;

            for (int i = 0; i < bigArray.Length; i++)
            {
                AndroidJavaObject   tempJavaObject = bigArray[i];
                AndroidJavaObject[] InnerArray     = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(tempJavaObject.GetRawObject());

                for (int j = 0; j < InnerArray.Length; j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    virtualGoodCategoryInner[count] = new VirtualGoodCategory(tempObj.GetRawObject(), tempObj);
                    count++;
                }
                yield return(new WaitForSeconds(0.2f));
            }
            finalVirtualGoodCategory = virtualGoodCategoryInner;
        }
Esempio n. 10
0
 public static void GetVirtualGoods(VirtualGoodType type, VirtualGoodCategory virtualGoodCategory, VirtualGood.GetVirtualGoodArrayFinished callback)
 {
     ApplicasaIAPGetVirtualGoodsOfTypeAndCategory(type, virtualGoodCategory.innerVirtualGoodCategory , callback);
 }
Esempio n. 11
0
 public static void GetVirtualGoodCategories(VirtualGoodCategory.GetVirtualGoodCategoryArrayFinished callback)
 {
     ApplicasaIAPGetVirtualGoodCategoriesWithBlock(callback);
 }
 public static VirtualGoodCategory[] GetVirtualGoodCategoryArray(VirtualGoodCategoryArray virtualGoodCategoryArray)
 {
     VirtualGoodCategory[] virtualGoodCategorys = new VirtualGoodCategory[0];
     return virtualGoodCategorys;
 }
Esempio n. 13
0
        public static VirtualGoodCategory[] GetArrayWithQuerySync(Query query, QueryKind queryKind)
        {
            VirtualGoodCategory[] virtualGoodCategory = new VirtualGoodCategory[0];

            return(virtualGoodCategory);
        }
        public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind)
        {
            if(javaUnityApplicasaVirtualGoodCategory==null)
                javaUnityApplicasaVirtualGoodCategory = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaVirtualGoodCategory");

                AndroidJavaObject[] bigArray = javaUnityApplicasaVirtualGoodCategory.CallStatic<AndroidJavaObject[]>("ApplicasaVirtualGoodCategoryGetArrayWithQuerySync", query.innerQueryJavaObject, (int)queryKind);

            VirtualGoodCategory[] virtualGoodCategoryInner= null;;
            for (int i = 0;i < bigArray.Length;i++)
            {
                AndroidJavaObject tempJavaObject = bigArray[i];

                AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(tempJavaObject.GetRawObject());
                VirtualGoodCategory[] virtualGoodCategorytemp = new VirtualGoodCategory[InnerArray.Length];
                for (int j = 0;j < InnerArray.Length;j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    virtualGoodCategorytemp[j] = new VirtualGoodCategory(tempObj.GetRawObject(),tempObj);
                }
                if (virtualGoodCategoryInner == null)
                    virtualGoodCategoryInner = virtualGoodCategorytemp;
                else{
                   VirtualGoodCategory[] firstOne = virtualGoodCategoryInner;
                    virtualGoodCategoryInner = new VirtualGoodCategory[firstOne.Length+virtualGoodCategorytemp.Length];
                    firstOne.CopyTo(virtualGoodCategoryInner,0);
                    virtualGoodCategorytemp.CopyTo(virtualGoodCategoryInner,firstOne.Length);
                }
                yield return new WaitForSeconds(0.2f);
            }
            finalVirtualGoodCategory = virtualGoodCategoryInner;
        }
        public static IEnumerator GetVirtualGoodCategoryArrayIEnumerator(VirtualGoodCategoryArray virtualGoodCategoryArray)
        {
            VirtualGoodCategory[] virtualGoodCategoryInner = new VirtualGoodCategory[virtualGoodCategoryArray.ArraySize];
            AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(virtualGoodCategoryArray.Array);

            int count = 0;
            for (int i = 0;i < bigArray.Length;i++)
            {
                AndroidJavaObject tempJavaObject = bigArray[i];
                AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(tempJavaObject.GetRawObject());

                for (int j = 0;j < InnerArray.Length;j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    virtualGoodCategoryInner[count] = new VirtualGoodCategory(tempObj.GetRawObject(),tempObj);
                    count++;
                }
                yield return new WaitForSeconds(0.2f);
            }
            finalVirtualGoodCategory = virtualGoodCategoryInner;
        }
        public static VirtualGoodCategory[] GetVirtualGoodCategoryArray(VirtualGoodCategoryArray virtualGoodCategoryArray)
        {
            VirtualGoodCategory[] virtualGoodCategorys = new VirtualGoodCategory[virtualGoodCategoryArray.ArraySize];

            for (int i=0; i < virtualGoodCategoryArray.ArraySize; i++) {

                IntPtr newPtr = Marshal.ReadIntPtr (virtualGoodCategoryArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
                virtualGoodCategorys[i] = new VirtualGoodCategory(newPtr);
            }
            return virtualGoodCategorys;
        }
Esempio n. 17
0
        public static void GetVirtualGoods(VirtualGoodType type, VirtualGoodCategory virtualGoodCategory, VirtualGood.GetVirtualGoodArrayFinished callback)
        {
            if(javaUnityApplicasaIAP==null)
                javaUnityApplicasaIAP = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaIAP");
            Error error;
            error.Id=1;
            error.Message="Success";

            AndroidJavaObject virtualGoodArrayJava = javaUnityApplicasaIAP.CallStatic<AndroidJavaObject>("ApplicasaIAPGetVirtualGoodsOfTypeAndCategory",(int)type, virtualGoodCategory.innerVirtualGoodCategoryJavaObject);
            VirtualGood.VirtualGoodArray virtualGoodArray = new VirtualGood.VirtualGoodArray();

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

            callback(true,error,virtualGoodArray);
        }
Esempio n. 18
0
 public static void GetVirtualGoodCategories(VirtualGoodCategory.GetVirtualGoodCategoryArrayFinished callback)
 {
     callback(true,new Error(),new VirtualGoodCategory.VirtualGoodCategoryArray());
 }
        public static VirtualGoodCategory[] GetArrayWithQuerySync(Query query, QueryKind queryKind)
        {
            VirtualGoodCategory[] virtualGoodCategory = new VirtualGoodCategory[0];

            return virtualGoodCategory;
        }
 public static VirtualGoodCategory[] GetArrayWithQuerySync(Query query, QueryKind queryKind)
 {
     if(javaUnityApplicasaVirtualGoodCategory==null)
         javaUnityApplicasaVirtualGoodCategory = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaVirtualGoodCategory");
     AndroidJavaObject tempJavaObjectArray = javaUnityApplicasaVirtualGoodCategory.CallStatic<AndroidJavaObject>("ApplicasaVirtualGoodCategoryGetArrayWithQuerySync", query.innerQueryJavaObject, (int)queryKind);
     VirtualGoodCategory[] virtualGoodCategory;
     if(javaUnityApplicasaVirtualGoodCategory==null){
         virtualGoodCategory = new VirtualGoodCategory[0];
     }else{
         int tempLength=tempJavaObjectArray.Call<int>("size");
         virtualGoodCategory = new VirtualGoodCategory[tempLength];
         for (int i=0; i < tempLength; i++) {
             AndroidJavaObject tempJavaObject = tempJavaObjectArray.Call<AndroidJavaObject>("get",i);
             IntPtr newPtr = AndroidJNI.NewGlobalRef(tempJavaObject.GetRawObject());
             virtualGoodCategory[i] = new VirtualGoodCategory(newPtr, new AndroidJavaObject(newPtr));
         }
     }
     return virtualGoodCategory;
 }
Esempio n. 21
0
 public static void GetVirtualGoods(VirtualGoodType type, VirtualGoodCategory virtualGoodCategory, GetVirtualGoodArrayFinished callback)
 {
     if(javaUnityApplicasaVirtualGood==null)
         javaUnityApplicasaVirtualGood = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaVirtualGood");
     int uniqueActionID=Core.currentCallbackID;
     Core.currentCallbackID++;
     setGetVirtualGoodArrayFinished(callback, uniqueActionID);
     javaUnityApplicasaVirtualGood.CallStatic("ApplicasaVirtualGoodsGetVirtualGoodsOfTypeAndCategory", (int)type, virtualGoodCategory.innerVirtualGoodCategoryJavaObject, uniqueActionID);
 }
 public static IEnumerator GetVirtualGoodCategoryArrayIEnumerator(VirtualGoodCategoryArray virtualGoodCategoryArray)
 {
     yield return new WaitForSeconds(0.2f);
     VirtualGoodCategory[]  virtualGoodCategoryInner = new VirtualGoodCategory[0];
     finalVirtualGoodCategory = virtualGoodCategoryInner;
 }
 public static IEnumerator GetArrayWithQuerySyncIEnumerator(Query query, QueryKind queryKind)
 {
     yield return new WaitForSeconds(0.2f);
         VirtualGoodCategory[]  virtualGoodCategoryInner = new VirtualGoodCategory[0];
         finalVirtualGoodCategory = virtualGoodCategoryInner;
 }
Esempio n. 24
0
 private static extern void ApplicasaIAPGetVirtualGoodCategoriesWithBlock(VirtualGoodCategory.GetVirtualGoodCategoryArrayFinished callback);
Esempio n. 25
0
 public static void GetVirtualGoods(VirtualGoodType type, VirtualGoodCategory virtualGoodCategory, VirtualGood.GetVirtualGoodArrayFinished callback)
 {
     callback(true, new Error(), new VirtualGood.VirtualGoodArray());
 }
Esempio n. 26
0
 public static void GetVirtualGoods(VirtualGoodType type, VirtualGoodCategory virtualGoodCategory, VirtualGood.GetVirtualGoodArrayFinished callback)
 {
     callback(true,new Error(),new VirtualGood.VirtualGoodArray());
 }
Esempio n. 27
0
        public static void GetVirtualGoods(VirtualGoodType type, VirtualGoodCategory virtualGoodCategory, VirtualGood.GetVirtualGoodArrayFinished callback)
        {
            if(javaUnityApplicasaIAP==null)
                javaUnityApplicasaIAP = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaIAP");
            Error error;
            error.Id=1;
            error.Message="Success";

            AndroidJavaObject virtualGoodArrayJava = javaUnityApplicasaIAP.CallStatic<AndroidJavaObject>("ApplicasaIAPGetVirtualGoodsOfTypeAndCategory",(int)type, virtualGoodCategory.innerVirtualGoodCategoryJavaObject);

            VirtualGood.VirtualGoodArray virtualGoodArray;

            virtualGoodArray.ArraySize=virtualGoodArrayJava.Call<int>("size");
            virtualGoodArray.Array=virtualGoodArrayJava.GetRawObject();

            callback(true,error,virtualGoodArray);
        }
Esempio n. 28
0
 public static VirtualGoodCategory[] GetVirtualGoodCategoryArray(VirtualGoodCategoryArray virtualGoodCategoryArray)
 {
     VirtualGoodCategory[] virtualGoodCategorys = new VirtualGoodCategory[0];
     return(virtualGoodCategorys);
 }
        public static VirtualGoodCategory[] GetVirtualGoodCategoryArray(VirtualGoodCategoryArray virtualGoodCategoryArray)
        {
            VirtualGoodCategory[] virtualGoodCategoryInner = new VirtualGoodCategory[virtualGoodCategoryArray.ArraySize];
            AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(virtualGoodCategoryArray.Array);

            int count = 0;
            for (int i = 0;i < bigArray.Length;i++)
            {
                AndroidJavaObject tempJavaObject = bigArray[i];
                AndroidJavaObject[] InnerArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(tempJavaObject.GetRawObject());

                for (int j = 0;j < InnerArray.Length;j++)
                {
                    AndroidJavaObject tempObj = InnerArray[j];
                    virtualGoodCategoryInner[count] = new VirtualGoodCategory(tempObj.GetRawObject(),tempObj);
                    count++;
                }
            }
            return virtualGoodCategoryInner;
        }
Esempio n. 30
0
 public static void GetVirtualGoods(VirtualGoodType type, VirtualGoodCategory virtualGoodCategory, VirtualGood.GetVirtualGoodArrayFinished callback)
 {
     ApplicasaIAPGetVirtualGoodsOfTypeAndCategory(type, virtualGoodCategory.innerVirtualGoodCategory, callback);
 }
Esempio n. 31
0
        public static void GetVirtualGoodCategories(VirtualGoodCategory.GetVirtualGoodCategoryArrayFinished callback)
        {
            if(javaUnityApplicasaIAP==null)
                javaUnityApplicasaIAP = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaIAP");
            Error error;
            error.Id=1;
            error.Message="Success";

            AndroidJavaObject virtualGoodCategoryArrayJava = javaUnityApplicasaIAP.CallStatic<AndroidJavaObject>("ApplicasaIAPGetVirtualGoodCategoriesWithBlock");

            VirtualGoodCategory.VirtualGoodCategoryArray virtualGoodCategoryArray;

            virtualGoodCategoryArray.ArraySize=virtualGoodCategoryArrayJava.Call<int>("size");
            virtualGoodCategoryArray.Array=virtualGoodCategoryArrayJava.GetRawObject();

            callback(true,error,virtualGoodCategoryArray);
        }