/// <summary>
        ///     Set configuration For Initialize Game Service.
        /// </summary>
        /// <param name="configuration">(NOTNULL)configuration For Initialize Game Service</param>
        public static void ConfigurationInstance(GameServiceClientConfiguration configuration)
        {
            if (configuration == null)
            {
                throw new GameServiceException("Configuration Cant Be Null").LogException(typeof(GameService),
                                                                                          DebugLocation.Internal, "ConfigurationInstance");
            }

            if (SynchronizationContext.Current == null)
            {
                SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());
            }

            SynchronizationContext = SynchronizationContext.Current;

            if (IsAuthenticated())
            {
                throw new GameServiceException("Must Logout First To ReConfiguration").LogException(typeof(GameService),
                                                                                                    DebugLocation.Internal, "ConfigurationInstance");
            }

            Configuration   = configuration;
            HandlerType     = EventHandlerType.UnityContext;
            DownloadManager = new DownloadManager(Configuration);

            Achievement   = new AchievementProvider();
            Assets        = new AssetsProvider();
            Data          = new DataProvider();
            Table         = new TableProvider();
            CloudFunction = new CloudFunctionProvider();
            Leaderboard   = new LeaderboardProvider();
            LoginOrSignUp = new LoginOrSignUpProvider();
            Player        = new PlayerProvider();
            Save          = new SaveProvider();

            GSLive = new GsLive();
            Social = new Social.Social();
        }
Ejemplo n.º 2
0
 public CardsFactory(AssetsProvider assetsProvider) =>