public void Quit(Action <bool> callback) { if (mInitialized) { Hub.RunInBackground = true; mExitSDKCallback += callback; M4399SDK.Quit(); } }
public void Login(Action <string, object> callback) { EB.Debug.Log("M4399SDKManager.Login"); if (!mInitialized) { callback("M4399SDK has not been inited", null); return; } mLoginCallback += callback; Hub.RunInBackground = true; M4399SDK.Login(); }
public void InitSDK(Action <string, bool> callback) { if (mInitialized) { EB.Debug.LogWarning("M4399SDKManager.InitializeSDK: Initialized"); callback(null, true); return; } if (Application.platform != RuntimePlatform.Android) { callback(null, false); return; } mInitCallback += callback; Hub.RunInBackground = true; new GameObject("m4399_plugin_listener", typeof(SparxM4399SDKManager)); M4399SDK.InitSDK(); }
public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback) { EB.Debug.Log("M4399SDKManager.Pay"); if (!mInitialized) { EB.Debug.LogError("M4399SDKManager.Pay: not initialized"); callback(M4399ResultCode.Failed); return; } mPayCallback += callback; var user = Hub.Instance.LoginManager.LocalUser; int je = (int)item.cost; string mark = transaction.transactionId; string name = item.longName; EB.Debug.Log("M4399SDKManager.Pay: je = {0}, mark={1}, name = {2}", je, mark, name); M4399SDK.Pay((int)item.cost, transaction.transactionId, item.longName); }
public override void OnLoggedIn() { base.OnLoggedIn(); M4399SDK.SetServer(LoginManager.Instance.LocalUser.WorldId); }
public void Logout() { M4399SDK.Logout(); }