public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray) { VirtualGood[] virtualGoods = new VirtualGood[virtualGoodArray.ArraySize]; for (int i = 0; i < virtualGoodArray.ArraySize; i++) { IntPtr newPtr = Marshal.ReadIntPtr(virtualGoodArray.Array, i * Marshal.SizeOf(typeof(IntPtr))); virtualGoods[i] = new VirtualGood(newPtr); } return(virtualGoods); }
public static void UseVirtualGood(VirtualGood virtualGood, int quantity, Action action) { if (javaUnityApplicasaIAP == null) { javaUnityApplicasaIAP = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaIAP"); } int uniqueActionID = Core.currentCallbackID; Core.currentCallbackID++; Core.setActionCallback(action, uniqueActionID); javaUnityApplicasaIAP.CallStatic("ApplicasaIAPUseVirtualGood", virtualGood.innerVirtualGoodJavaObject, quantity, uniqueActionID); }
public static void BuyVirtualGood(VirtualGood virtualGood, int quantity, Currency currencyKind, Action action) { if (currencyKind == Currency.RealMoney) { BuyWithRealMoney(virtualGood, action); } else { if (javaUnityApplicasaIAP == null) { javaUnityApplicasaIAP = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaIAP"); } int uniqueActionID = Core.currentCallbackID; Core.currentCallbackID++; Core.setActionCallback(action, uniqueActionID); javaUnityApplicasaIAP.CallStatic("ApplicasaIAPBuyVirtualGood", virtualGood.innerVirtualGoodJavaObject, quantity, (int)currencyKind, uniqueActionID); } }
public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray) { VirtualGood[] virtualGoodInner = new VirtualGood[virtualGoodArray.ArraySize]; AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(virtualGoodArray.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]; virtualGoodInner[count] = new VirtualGood(tempObj.GetRawObject(), tempObj); count++; } } return(virtualGoodInner); }
public static void BuyWithRealMoney(VirtualGood virtualGood, Action action) { virtualGood.BuyWithRealMoney(action); }
public static void UseVirtualGood(VirtualGood virtualGood, int quantity, Action action) { action(true,new Error(),"",Actions.DoIapAction); }
public static void GetVirtualGoodsByCategoryPosition(VirtualGoodType type, int position, VirtualGood.GetVirtualGoodArrayFinished callback) { callback(true,new Error(),new VirtualGood.VirtualGoodArray()); }
private static extern void ApplicasaIAPGetVirtualGoodsOfType(VirtualGoodType type, VirtualGood.GetVirtualGoodArrayFinished callback);
public static void UseVirtualGood(VirtualGood virtualGood, int quantity, Action action) { action(true, new Error(), "", Actions.DoIapAction); }
public static void GetVirtualGoodsByCategoryPosition(VirtualGoodType type, int position, VirtualGood.GetVirtualGoodArrayFinished callback) { if(javaUnityApplicasaVirtualGood==null) javaUnityApplicasaVirtualGood = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaVirtualGood"); int uniqueActionID=Core.currentCallbackID; Core.currentCallbackID++; setGetVirtualGoodArrayFinished(callback, uniqueActionID); javaUnityApplicasaVirtualGood.CallStatic("ApplicasaVirtualGoodsGetVirtualGoodsByCategoryPosition", (int)type, position , uniqueActionID); }
public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray) { VirtualGood[] virtualGoodInner = new VirtualGood[virtualGoodArray.ArraySize]; AndroidJavaObject[] bigArray = AndroidJNIHelper.ConvertFromJNIArray<AndroidJavaObject[]>(virtualGoodArray.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]; virtualGoodInner[count] = new VirtualGood(tempObj.GetRawObject(),tempObj); count++; } } return virtualGoodInner; }
public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray) { VirtualGood[] virtualGoods = new VirtualGood[0]; return virtualGoods; }
public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray) { VirtualGood[] virtualGoods = new VirtualGood[virtualGoodArray.ArraySize]; for (int i=0; i < virtualGoodArray.ArraySize; i++) { IntPtr newPtr = Marshal.ReadIntPtr (virtualGoodArray.Array, i * Marshal.SizeOf(typeof(IntPtr))); virtualGoods[i] = new VirtualGood(newPtr); } return virtualGoods; }
public static void BuyWithRealMoney(VirtualGood virtualGood, Action action) { ApplicasaIAPBuyWithRealMoney(virtualGood.innerVirtualGood, action); }
public static void BuyVirtualGood(VirtualGood virtualGood, int quantity, Currency currencyKind, Action action) { ApplicasaIAPBuyVirtualGood(virtualGood.innerVirtualGood, quantity, currencyKind, action); }
public static void GetVirtualGoodsByCategoryPosition(VirtualGoodType type, int position, 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>("ApplicasaIAPGetVirtualGoodsOfTypeByCategoryPosition", position, (int)type); VirtualGood.VirtualGoodArray virtualGoodArray; virtualGoodArray.ArraySize=virtualGoodArrayJava.Call<int>("size"); virtualGoodArray.Array=virtualGoodArrayJava.GetRawObject(); callback(true,error,virtualGoodArray); }
public static void BuyVirtualGood(VirtualGood virtualGood, int quantity, Currency currencyKind, Action action) { action(true, new Error(), "", Actions.DoIapAction); }
public static void GetVirtualGoods(VirtualGoodType type, VirtualGood.GetVirtualGoodArrayFinished callback) { ApplicasaIAPGetVirtualGoodsOfType(type, callback); }
public static void UseVirtualGood(VirtualGood virtualGood, int quantity, Action action) { ApplicasaIAPUseVirtualGood(virtualGood.innerVirtualGood, quantity, action); }
public static void GetVirtualGoods(VirtualGoodType type, VirtualGoodCategory virtualGoodCategory, VirtualGood.GetVirtualGoodArrayFinished callback) { ApplicasaIAPGetVirtualGoodsOfTypeAndCategory(type, virtualGoodCategory.innerVirtualGoodCategory , callback); }
public static void GetVirtualGoods(VirtualGoodType type, VirtualGoodCategory virtualGoodCategory, VirtualGood.GetVirtualGoodArrayFinished callback) { callback(true,new Error(),new VirtualGood.VirtualGoodArray()); }
public static void GetVirtualGoodsByCategoryPosition(VirtualGoodType type, int position, VirtualGood.GetVirtualGoodArrayFinished callback) { ApplicasaIAPGetVirtualGoodsByCategoryPosition(type, position , callback); }
private static extern void ApplicasaIAPGetVirtualGoodsOfTypeAndCategory(VirtualGoodType type, IntPtr virtualGoodCategory, VirtualGood.GetVirtualGoodArrayFinished callback);
public static void UseVirtualGood(VirtualGood virtualGood, int quantity, Action action) { virtualGood.Use(quantity,action); }
public static void BuyVirtualGood(VirtualGood virtualGood, int quantity, Currency currencyKind, Action action) { virtualGood.Buy(quantity,currencyKind,action); }
public static void BuyVirtualGood(VirtualGood virtualGood, int quantity, Currency currencyKind, Action action) { if (currencyKind == Currency.RealMoney) { BuyWithRealMoney(virtualGood, action); } else{ if(javaUnityApplicasaIAP==null) javaUnityApplicasaIAP = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaIAP"); int uniqueActionID=Core.currentCallbackID; Core.currentCallbackID++; Core.setActionCallback(action,uniqueActionID); javaUnityApplicasaIAP.CallStatic("ApplicasaIAPBuyVirtualGood", virtualGood.innerVirtualGoodJavaObject, quantity, (int)currencyKind, uniqueActionID); } }
public static void BuyWithRealMoney(VirtualGood virtualGood, Action action) { if(javaUnityApplicasaIAP==null) javaUnityApplicasaIAP = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaIAP"); int uniqueActionID=Core.currentCallbackID; Core.currentCallbackID++; Core.setActionCallback(action,uniqueActionID); javaUnityApplicasaIAP.CallStatic("ApplicasaIAPBuyWithRealMoney", virtualGood.innerVirtualGoodJavaObject, uniqueActionID); }
public static void GetVirtualGoodsByCategoryPosition(VirtualGoodType type, int position, 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>("ApplicasaIAPGetVirtualGoodsOfTypeByCategoryPosition", position, (int)type); 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); }
public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray) { VirtualGood[] virtualGoods = new VirtualGood[0]; return(virtualGoods); }
public static void UseVirtualGood(VirtualGood virtualGood, int quantity, Action action) { if(javaUnityApplicasaIAP==null) javaUnityApplicasaIAP = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaIAP"); int uniqueActionID=Core.currentCallbackID; Core.currentCallbackID++; Core.setActionCallback(action,uniqueActionID); javaUnityApplicasaIAP.CallStatic("ApplicasaIAPUseVirtualGood",virtualGood.innerVirtualGoodJavaObject, quantity, uniqueActionID); }
public static void BuyVirtualGood(VirtualGood virtualGood, int quantity, Currency currencyKind, Action action) { virtualGood.Buy(quantity, currencyKind, action); }
private static extern void ApplicasaIAPGetVirtualGoodsByCategoryPosition(VirtualGoodType type, int position, VirtualGood.GetVirtualGoodArrayFinished callback);
public static void BuyVirtualGood(VirtualGood virtualGood, int quantity, Currency currencyKind, Action action) { action(true,new Error(),"",Actions.DoIapAction); }
public static void BuyWithRealMoney(VirtualGood virtualGood, Action action) { action(true, new Error(), "", Actions.DoIapAction); }
public static void BuyWithRealMoney(VirtualGood virtualGood, Action action) { action(true,new Error(),"",Actions.DoIapAction); }
public static void UseVirtualGood(VirtualGood virtualGood, int quantity, Action action) { virtualGood.Use(quantity, action); }
public static VirtualGood[] GetVirtualGoodArray(VirtualGoodArray virtualGoodArray) { VirtualGood[] virtualGoods = new VirtualGood[virtualGoodArray.ArraySize]; #if UNITY_ANDROID AndroidJavaObject tempJavaObjectArray=new AndroidJavaObject(virtualGoodArray.Array); #endif for (int i = 0; i < virtualGoodArray.ArraySize; i++) { #if UNITY_IPHONE IntPtr newPtr = Marshal.ReadIntPtr (virtualGoodArray.Array, i * Marshal.SizeOf(typeof(IntPtr))); virtualGoods[i] = new VirtualGood(newPtr); #endif #if UNITY_ANDROID AndroidJavaObject tempJavaObject = tempJavaObjectArray.Call<AndroidJavaObject>("get",i); IntPtr newPtr = AndroidJNI.NewGlobalRef(tempJavaObject.GetRawObject()); virtualGoods[i] = new VirtualGood(newPtr,new AndroidJavaObject(newPtr)); #endif } return virtualGoods; }