public void ExitSDK(Action <bool> callback) { if (mInitialized) { Hub.RunInBackground = true; mExitSDKCallback += callback; OPPOGameSDK.ExitSDK(); } }
void OnApplicationPause(bool pauseStatus) { if (pauseStatus) { EB.Debug.Log("SparxOPPOSDKManager.OnApplicationPause.OnPause"); OPPOGameSDK.OnPause(); } else { EB.Debug.Log("SparxOPPOSDKManager.OnApplicationPause.OnResume"); OPPOGameSDK.OnResume(); SparxHub.Instance.OPPOSDKManager.OnLoginEnteredForeground(); } }
public void Login(Action <string, object> callback) { EB.Debug.Log("OPPOSDKManager.Login"); if (!mInitialized) { callback("OPPOSD has not been inited", null); return; } mLoginCallback += callback; Hub.RunInBackground = true; OPPOGameSDK.Login(); }
public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback) { EB.Debug.Log("QiHooSDKManager.Pay"); if (!mInitialized) { EB.Debug.LogError("QiHooSDKManager.Pay: not initialized"); callback(OPPOStatusCode.FAILURE); return; } mPayCallback += callback; var user = Hub.Instance.LoginManager.LocalUser; OPPOGameSDK.Pay(transaction.transactionId, item.cents, item.localizedDesc, item.longName, mNotifyUrl); }
public void InitSDK(object options, Action <string, bool> callback) { if (mInitialized) { EB.Debug.LogWarning("OPPOSDKManager.InitializeSDK: Initialized"); callback(null, true); return; } if (Application.platform != RuntimePlatform.Android) { callback(null, false); return; } mNotifyUrl = EB.Dot.String("notifyUrl", options, mNotifyUrl); appId = EB.Dot.String("appId", options, appId); appSecret = EB.Dot.String("appSecret", options, appSecret); EB.Debug.Log("OPPOSDKManager.InitSDK notifyUrl = {0}", mNotifyUrl); EB.Debug.Log("OPPOSDKManager.InitSDK appId = {0}", appId); EB.Debug.Log("OPPOSDKManager.InitSDK appSecret = {0}", appSecret); mInitCallback += callback; Hub.RunInBackground = true; new GameObject("oppo_plugin_listener", typeof(SparxOPPOSDKManager)); OPPOGameSDK.InitSDK(appId, appSecret); }
public void ReportUserGameInfoData(string serverId, string roleName, string level) { OPPOGameSDK.ReportUserGameInfoData(serverId, roleName, level); }
public void GetTokenAndSsoid(Action <string> callback) { mGetTokenAndSsoidCallback = callback; OPPOGameSDK.GetTokenAndSsoid(); }