public void Login(string providerName, Dictionary <string, object> additionalInfo, GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> callback)
        {
            GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> loginCallback = (authToken, error) =>
            {
                if (Gamebase.IsSuccess(error) == true)
                {
                    SetUserIdOfIndicatorReport();
                }
                callback(authToken, error);
            };

            int handle = GamebaseCallbackHandler.RegisterCallback(loginCallback);

            auth.Login(providerName, additionalInfo, handle);
        }
        public void LoginForLastLoggedInProvider(GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> callback)
        {
            GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> loginCallback = (authToken, error) =>
            {
                if (Gamebase.IsSuccess(error) == true)
                {
                    SetUserIdOfIndicatorReport();
                }
                callback(authToken, error);
            };

            int handle = GamebaseCallbackHandler.RegisterCallback(loginCallback);

            auth.LoginForLastLoggedInProvider(handle);
        }
        public void ShowWebView(string url, GamebaseRequest.Webview.GamebaseWebViewConfiguration configuration = null, GamebaseCallback.ErrorDelegate closeCallback = null, List <string> schemeList = null, GamebaseCallback.GamebaseDelegate <string> schemeEvent = null)
        {
            int closeCallbackHandle = -1;
            int schemeEventHandle   = -1;

            if (null != closeCallback)
            {
                closeCallbackHandle = GamebaseCallbackHandler.RegisterCallback(closeCallback);
            }

            if (null != schemeEvent)
            {
                schemeEventHandle = GamebaseCallbackHandler.RegisterCallback(schemeEvent);
            }

            webview.ShowWebView(url, configuration, closeCallbackHandle, schemeList, schemeEventHandle);
        }
        public void Initialize(GamebaseRequest.GamebaseConfiguration configuration, GamebaseCallback.GamebaseDelegate <GamebaseResponse.Launching.LaunchingInfo> callback)
        {
            var sb = new StringBuilder();

            sb.AppendLine(string.Format("Gamebase VERSION:{0}", GamebaseUnitySDK.SDKVersion));
            sb.AppendLine(string.Format("Gamebase Configuration:{0}", GamebaseJsonUtil.ToPrettyJsonString(configuration)));
            GamebaseLog.Debug(string.Format("{0}", sb), this);

            InitializeUnitySDK();

            configuration.zoneType = GetVerifiedZoneType(configuration.zoneType);

            SetGamebaseConfiguration(configuration);

            GamebaseCallback.GamebaseDelegate <GamebaseResponse.Launching.LaunchingInfo> initializeCallback = (launchingInfo, error) =>
            {
                if ((error == null || error.code == GamebaseErrorCode.SUCCESS))
                {
                    GamebaseDebugSettings.Instance.SetRemoteSettings(launchingInfo);

                    GamebaseWaterMark.ShowWaterMark();
                }

                GamebaseLogReport.Instance.AddBasicData(new Dictionary <string, string>()
                {
                    { GamebaseLogReport.BASIC_DATA_KEY_APP_ID, GamebaseUnitySDK.AppID }
                });

                SendUnityEditorInfomation();

                callback(launchingInfo, error);
            };

            int handle = GamebaseCallbackHandler.RegisterCallback(initializeCallback);

            sdk.Initialize(configuration, handle);
        }
Ejemplo n.º 5
0
 private GamebaseServerPushEventManager()
 {
     Handle = GamebaseCallbackHandler.RegisterCallback(new GamebaseCallback.DataDelegate <GamebaseResponse.SDK.ServerPushMessage>(OnServerPushEvent));
 }
        public void AddMappingForcibly(string providerName, string forcingMappingKey, Dictionary <string, object> additionalInfo, GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            auth.AddMappingForcibly(providerName, forcingMappingKey, additionalInfo, handle);
        }
        public void RegisterPush(GamebaseRequest.Push.PushConfiguration pushConfiguration, GamebaseCallback.ErrorDelegate callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            push.RegisterPush(pushConfiguration, handle);
        }
        public void RequestActivatedPurchases(GamebaseCallback.GamebaseDelegate <List <GamebaseResponse.Purchase.PurchasableReceipt> > callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            purchase.RequestActivatedPurchases(handle);
        }
        public void RemoveMapping(string providerName, GamebaseCallback.ErrorDelegate callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            auth.RemoveMapping(providerName, handle);
        }
        public void RequestPurchase(long itemSeq, GamebaseCallback.GamebaseDelegate <GamebaseResponse.Purchase.PurchasableReceipt> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            purchase.RequestPurchase(itemSeq, handle);
        }
        public void IssueShortTermTicket(GamebaseCallback.GamebaseDelegate <string> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            auth.IssueShortTermTicket(handle);
        }
        public void TransferAccountWithIdPLogin(string accountId, string accountPassword, GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            auth.TransferAccountWithIdPLogin(accountId, accountPassword, handle);
        }
        public void RenewTransferAccount(GamebaseRequest.Auth.TransferAccountRenewConfiguration configuration, GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.TransferAccountInfo> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            auth.RenewTransferAccount(configuration, handle);
        }
        public void QueryTransferAccount(GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.TransferAccountInfo> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            auth.QueryTransferAccount(handle);
        }
        public void Withdraw(GamebaseCallback.ErrorDelegate callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            auth.Withdraw(handle);
        }
        public void Logout(GamebaseCallback.ErrorDelegate callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            auth.Logout(handle);
        }
        public void RequestItemListOfNotConsumed(GamebaseCallback.GamebaseDelegate <List <GamebaseResponse.Purchase.PurchasableReceipt> > callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            purchase.RequestItemListOfNotConsumed(handle);
        }
Ejemplo n.º 18
0
        public void IsConnected(GamebaseCallback.DataDelegate <bool> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            network.IsConnected(handle);
        }
        public void RequestItemListAtIAPConsole(GamebaseCallback.GamebaseDelegate <List <GamebaseResponse.Purchase.PurchasableItem> > callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            purchase.RequestItemListAtIAPConsole(handle);
        }
        public void RequestPurchase(string marketItemId, GamebaseCallback.GamebaseDelegate <GamebaseResponse.Purchase.PurchasableReceipt> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            purchase.RequestPurchase(marketItemId, handle);
        }
        public void AddMappingForcibly(Dictionary <string, object> credentialInfo, string forcingMappingKey, GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            auth.AddMappingForcibly(credentialInfo, forcingMappingKey, handle);
        }
        public void RequestRetryTransaction(GamebaseCallback.GamebaseDelegate <GamebaseResponse.Purchase.PurchasableRetryTransactionResult> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            purchase.RequestRetryTransaction(handle);
        }
Ejemplo n.º 23
0
        public void OpenContact(GamebaseCallback.ErrorDelegate callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            contact.OpenContact(handle);
        }
        public void SetPromotionIAPHandler(GamebaseCallback.GamebaseDelegate <GamebaseResponse.Purchase.PurchasableReceipt> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            purchase.SetPromotionIAPHandler(handle);
        }
        public void ShowAlert(string title, string message, GamebaseCallback.VoidDelegate buttonCallback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(buttonCallback);

            util.ShowAlert(title, message, handle);
        }
Ejemplo n.º 26
0
 private GamebaseObserverManager()
 {
     Handle = GamebaseCallbackHandler.RegisterCallback(new GamebaseCallback.DataDelegate <GamebaseResponse.SDK.ObserverMessage>(OnObserverEvent));
 }
        public void ShowAlert(Dictionary <string, string> parameters, GamebaseUtilAlertType alertType, GamebaseCallback.DataDelegate <GamebaseUtilAlertButtonID> buttonCallback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(buttonCallback);

            util.ShowAlert(parameters, alertType, handle);
        }
        public void QueryPush(GamebaseCallback.GamebaseDelegate <GamebaseResponse.Push.PushConfiguration> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            push.QueryPush(handle);
        }
        public void AddMappingForcibly(string providerName, string forcingMappingKey, GamebaseCallback.GamebaseDelegate <GamebaseResponse.Auth.AuthToken> callback)
        {
            int handle = GamebaseCallbackHandler.RegisterCallback(callback);

            auth.AddMappingForcibly(providerName, forcingMappingKey, handle);
        }