public static void init(string base64EncodedPublicKey, cbFunc tmpIabSetupCBFunc) { if (g_inst ==null) return; g_inst.iabSetupCB =tmpIabSetupCBFunc; dispose(); g_inst.mIABHelperObj =new AndroidJavaObject("com.macaronics.iab.iabWrapper", new object[2]{base64EncodedPublicKey, "iabWrapper"}); }
public static void purchase(string strSKU, int reqCode, string payload, cbFunc tmpIabPurchaseCBFunc) { if (g_inst ==null) return; g_inst.iabPurchaseCB =tmpIabPurchaseCBFunc; if (g_inst.mIABHelperObj !=null) { g_inst.mIABHelperObj.Call("purchase", new object[3]{strSKU, reqCode.ToString(), payload}); } }
public static void consume_inapp(string strPurchaseJsonInfo, string strSignature, cbFunc tmpIabConsumeCBFunc) { if (g_inst ==null) return; g_inst.iabConsumeCB =tmpIabConsumeCBFunc; if (g_inst.mIABHelperObj !=null) { g_inst.mIABHelperObj.Call("consume", new object[3]{"inapp", strPurchaseJsonInfo, strSignature}); } }
public void getData(cbFunc func, string version, string ip = "") { try { if(_rwLock.TryEnterReadLock(_readWaiteTime)) { try { func(getConfigByVersion(version, ip)); } finally { if (_rwLock.IsReadLockHeld) _rwLock.ExitReadLock(); } } } catch (Exception e) { ConsoleLog.showErrorInfo(0,"GameConfigMgr getData"+e.Message); } }