public void RemoveFloatView() { if (mLogined) { WinnerGameSDK.RemoveFloatView(); } }
public void ShowFloatView() { if (mLogined) { WinnerGameSDK.ShowFloatView(); } }
public void InitSDK(object options, System.Action <string, bool> callback) { if (mInitialized) { EB.Debug.LogWarning("WinnerSDKManager.InitializeSDK: Initialized"); callback(null, true); return; } if (Application.platform != RuntimePlatform.Android) { callback(null, false); return; } mNotifyUrl = EB.Dot.String("notifyUrl", options, mNotifyUrl); EB.Debug.Log("WinnerSDKManager.InitSDK notifyUrl= {0}", mNotifyUrl); mInitCallback += callback; if (!mInitializing) { mInitializing = true; Hub.RunInBackground = true; new GameObject("winner_plugin_listener", typeof(SparxWinnerSDKManager)); WinnerGameSDK.InitSDK(); } }
public void Login(Action <string, object> callback) { EB.Debug.Log("WinnerGameSDK.Login"); if (!mInitialized) { callback("WinnerSDK has not been inited", null); return; } mLoginCallback += callback; Hub.RunInBackground = true; WinnerGameSDK.Login(); }
public void ExitSDK(System.Action <bool> callback) { if (mInitialized) { mInitialized = false; mLogined = false; mLoginCallback = null; mInitCallback = null; mPayCallback = null; mNotifyUrl = string.Empty; mExitCallback += callback; WinnerGameSDK.DestroySDK(); } }
public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback) { EB.Debug.Log("WinnerSDKManager.Pay={0}"); if (!mInitialized) { EB.Debug.LogError("WinnerSDKManager.Pay: not initialized"); callback(WinnerStatusCode.FAIL); return; } var user = Hub.Instance.LoginManager.LocalUser; mPayCallback += callback; WinnerGameSDK.Pay(GetUserId(), item.cost.ToString(), user.WorldId.ToString(), item.longName, item.localizedDesc, mNotifyUrl, transaction.transactionId); }