Example #1
0
        public static void InitGameService(
            string clientId
            , string clientSecret
            , bool logEnable
            , bool isGuest
            , DelegateCore.OnSuccessInit onSuccess
            , DelegateCore.OnError onError
            , DelegateCore.NotificationListener notificationListener
            )
        {
            var gameService = GetGameServiceInstance();

            gameService.Call("InitGameService",
                             clientId,
                             clientSecret,
                             logEnable,
                             isGuest,
                             new IGameServiceCallback(callBack => {
                if (callBack.Equals("Success"))
                {
                    onSuccess.Invoke(gameService);
                }
            },
                                                      onError.Invoke)
                             , new IGSNotificationListener(l =>
            {
                if (notificationListener != null)
                {
                    notificationListener.Invoke(l);
                }
            }));
        }
 public static void InitGameService(
     AndroidJavaObject gameService
     , GameServiceClientConfiguration configuration
     , DelegateCore.OnSuccessInit onSuccess
     , DelegateCore.OnError onError
     , DelegateCore.NotificationListener notificationListener
     )
 {
     gameService.Call("InitGameService"
                      , configuration.ClientId
                      , configuration.ClientSecret
                      , configuration.EnableLog
                      , configuration.LoginType == LoginType.Guest
                      , new IGameServiceCallback(c =>
     {
         if (c.Equals("Success"))
         {
             onSuccess.Invoke(gameService);
         }
     }, onError.Invoke)
                      , new IGSNotificationListener(l =>
     {
         if (notificationListener != null)
         {
             notificationListener.Invoke(l);
         }
     }));
 }
Example #3
0
 private GameServiceClientConfiguration(Builder builder)
 {
     _haveNotification     = builder.HaveNotification;
     _checkAppStatus       = builder.CheckAppStatus;
     _clientId             = builder.ClientId;
     _clientSecret         = builder.ClientSecret;
     _checkOptionalUpdate  = builder.CheckOptionalUpdate;
     _enableLog            = builder.EnableLog;
     _downloadTag          = builder.DownloadTag;
     _notificationListener = builder.NotificationListener;
     LoginType             = builder.LoginType;
 }
Example #4
0
 public Builder SetNotificationListener(DelegateCore.NotificationListener notificationListener)
 {
     _notificationListener = notificationListener;
     return(this);
 }