Ejemplo n.º 1
0
 public void Quit(Action <bool> callback)
 {
     if (mInitialized)
     {
         Hub.RunInBackground = true;
         mExitSDKCallback   += callback;
         M4399SDK.Quit();
     }
 }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 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();
 }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
 public override void OnLoggedIn()
 {
     base.OnLoggedIn();
     M4399SDK.SetServer(LoginManager.Instance.LocalUser.WorldId);
 }
Ejemplo n.º 6
0
 public void Logout()
 {
     M4399SDK.Logout();
 }