Exemplo n.º 1
0
        public static VirtualCurrency[] GetVirtualCurrencyArray(VirtualCurrencyArray virtualCurrencyArray)
        {
            VirtualCurrency[] virtualCurrencys = new VirtualCurrency[virtualCurrencyArray.ArraySize];

            for (int i = 0; i < virtualCurrencyArray.ArraySize; i++)
            {
                IntPtr newPtr = Marshal.ReadIntPtr(virtualCurrencyArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
                virtualCurrencys[i] = new VirtualCurrency(newPtr);
            }
            return(virtualCurrencys);
        }
Exemplo n.º 2
0
 public static VirtualCurrency[] GetVirtualCurrencyArray(VirtualCurrencyArray virtualCurrencyArray)
 {
     VirtualCurrency[] virtualCurrencies = new VirtualCurrency[virtualCurrencyArray.ArraySize];
     #if UNITY_ANDROID
     AndroidJavaObject tempJavaObjectArray=new AndroidJavaObject(virtualCurrencyArray.Array);
     #endif
     for (int i = 0; i < virtualCurrencyArray.ArraySize; i++)
     {
     #if UNITY_IPHONE
         IntPtr newPtr = Marshal.ReadIntPtr (virtualCurrencyArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
         virtualCurrencies[i] = new VirtualCurrency(newPtr);
     #endif
     #if UNITY_ANDROID
         AndroidJavaObject tempJavaObject = tempJavaObjectArray.Call<AndroidJavaObject>("get",i);
         IntPtr newPtr = AndroidJNI.NewGlobalRef(tempJavaObject.GetRawObject());
         virtualCurrencies[i] = new VirtualCurrency(newPtr, new AndroidJavaObject(newPtr));
     #endif
     }
     return virtualCurrencies;
 }
Exemplo n.º 3
0
        public static VirtualCurrency[] GetVirtualCurrencyArray(VirtualCurrencyArray virtualCurrencyArray)
        {
            VirtualCurrency[]   virtualCurrencyInner = new VirtualCurrency[virtualCurrencyArray.ArraySize];
            AndroidJavaObject[] bigArray             = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(virtualCurrencyArray.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];
                    virtualCurrencyInner[count] = new VirtualCurrency(tempObj.GetRawObject(), tempObj);
                    count++;
                }
            }
            return(virtualCurrencyInner);
        }
Exemplo n.º 4
0
 public static VirtualCurrency[] GetVirtualCurrencyArray(VirtualCurrencyArray virtualCurrencyArray)
 {
     VirtualCurrency[] virtualCurrencys = new VirtualCurrency[0];
     return(virtualCurrencys);
 }
Exemplo n.º 5
0
        public static VirtualCurrency[] GetVirtualCurrencyArray(VirtualCurrencyArray virtualCurrencyArray)
        {
            VirtualCurrency[] virtualCurrencyInner = new VirtualCurrency[virtualCurrencyArray.ArraySize];
            AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(virtualCurrencyArray.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];
                    virtualCurrencyInner[count] = new VirtualCurrency(tempObj.GetRawObject(),tempObj);
                    count++;
                }
            }
            return virtualCurrencyInner;
        }
Exemplo n.º 6
0
 public static VirtualCurrency[] GetVirtualCurrencyArray(VirtualCurrencyArray virtualCurrencyArray)
 {
     VirtualCurrency[] virtualCurrencys = new VirtualCurrency[0];
     return virtualCurrencys;
 }
Exemplo n.º 7
0
        public static VirtualCurrency[] GetVirtualCurrencyArray(VirtualCurrencyArray virtualCurrencyArray)
        {
            VirtualCurrency[] virtualCurrencys = new VirtualCurrency[virtualCurrencyArray.ArraySize];

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

                IntPtr newPtr = Marshal.ReadIntPtr (virtualCurrencyArray.Array, i * Marshal.SizeOf(typeof(IntPtr)));
                virtualCurrencys[i] = new VirtualCurrency(newPtr);
            }
            return virtualCurrencys;
        }