Ejemplo n.º 1
0
 public void ExitSDK(Action <bool> callback)
 {
     if (mInitialized)
     {
         Hub.RunInBackground = true;
         mExitSDKCallback   += callback;
         OPPOGameSDK.ExitSDK();
     }
 }
Ejemplo n.º 2
0
 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();
     }
 }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
 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);
 }
Ejemplo n.º 6
0
 public void ReportUserGameInfoData(string serverId, string roleName, string level)
 {
     OPPOGameSDK.ReportUserGameInfoData(serverId, roleName, level);
 }
Ejemplo n.º 7
0
 public void GetTokenAndSsoid(Action <string> callback)
 {
     mGetTokenAndSsoidCallback = callback;
     OPPOGameSDK.GetTokenAndSsoid();
 }