public void ExitSDK(System.Action <bool> callback) { if (mInitialized) { mExitSDKCallback += callback; LBGameSDK.ExitSDK(); } }
public void Login(Action <string, object> callback) { EB.Debug.Log("LBSDKManager.Login"); if (!mInitialized) { callback("LBSDK has not been inited", null); return; } mLoginCallback += callback; Hub.RunInBackground = true; LBGameSDK.Login(); }
public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int, object> callback) { EB.Debug.Log("LBSDKManager.Pay"); if (!mInitialized) { EB.Debug.LogError("LBSDKManager.Pay: not initialized"); callback(LBStatusCode.FAIL, null); return; } mPayCallback += callback; var user = Hub.Instance.LoginManager.LocalUser; string roleId = user.Id.Value.ToString(); string roleName = user.Name; int level = user.Level; LBGameSDK.Pay(roleId, roleName, level.ToString(), "serverId", "serverName", item.productId, item.longName, item.localizedDesc, ((int)item.cost).ToString(), transaction.transactionId); }
//public override void Destroy(Action callback) //{ // if (!mInitialized) // { // callback(); // return; // } // ExitSDK(callback); //} public void InitSDK(object options, Action <string, bool> callback) { if (mInitialized) { EB.Debug.LogWarning("LBSDKManager.InitializeSDK: Initialized"); callback(null, true); return; } if (Application.platform != RuntimePlatform.Android) { callback(null, false); return; } mInitCallback += callback; Hub.RunInBackground = true; new GameObject("lb_plugin_listener", typeof(SparxLBSDKManager)); LBGameSDK.InitSDK(); }
public void SubmitUserData(String roleId, String roleName, String roleLevel, String serverId, String serverName, int moneyNum, String uid) { LBGameSDK.SubmitUserData(roleId, roleName, roleLevel, serverId, serverName, moneyNum, uid); }