public void initContentAction()
        {
            ContentManifest manifest = ContentManifestUtility.FromDefinitionFile("Configuration/embedded_content_manifest");
            Content         instance = new Content(manifest);

            Service.Set(instance);
        }
Ejemplo n.º 2
0
    protected override IEnumerator setup()
    {
        GcsAccessTokenService gcsAccessTokenService = new GcsAccessTokenService(ConfigHelper.GetEnvironmentProperty <string>("GcsServiceAccountName"), new GcsP12AssetFileLoader(ConfigHelper.GetEnvironmentProperty <string>("GcsServiceAccountFile")));

        Service.Set((IGcsAccessTokenService)gcsAccessTokenService);
        string cdnUrl = ContentHelper.GetCdnUrl();
        string cpipeMappingFilename = ContentHelper.GetCpipeMappingFilename();
        CPipeManifestService cpipeManifestService = new CPipeManifestService(cdnUrl, cpipeMappingFilename, gcsAccessTokenService);

        Service.Set((ICPipeManifestService)cpipeManifestService);
        base.gameObject.AddComponent <KeyChainManager>();
        GameSettings gameSettings = new GameSettings();

        Service.Set(gameSettings);
        ContentManifest definition = ContentManifestUtility.FromDefinitionFile("Configuration/embedded_content_manifest");

        Service.Set(new Content(definition));
        Localizer localizer = Localizer.Instance;

        Service.Set(localizer);
        NullCPSwrveService cpSwrveService = new NullCPSwrveService();

        Service.Set((ICPSwrveService)cpSwrveService);
        NetworkServicesConfig networkConfig = NetworkController.GenerateNetworkServiceConfig(TestEnvironment);

        Service.Set((INetworkServicesManager) new NetworkServicesManager(this, networkConfig, offlineMode: false));
        CommerceService commerceService = new CommerceService();

        commerceService.Setup();
        Service.Set(commerceService);
        Service.Set(new MembershipService(null));
        ConnectionManager connectionManager = base.gameObject.AddComponent <ConnectionManager>();

        Service.Set(connectionManager);
        Service.Set(new SessionManager());
        Service.Set(new MixLoginCreateService());
        Service.Set((CPDataEntityCollection) new CPDataEntityCollectionImpl());
        LocalPlayerData localPlayerData = new LocalPlayerData
        {
            name         = "TestPlayer",
            tutorialData = new List <sbyte>()
        };
        PlayerId playerId = localPlayerData.id = new PlayerId
        {
            id   = "999999999999999",
            type = PlayerId.PlayerIdType.SESSION_ID
        };

        Service.Get <CPDataEntityCollection>().ResetLocalPlayerHandle();
        PlayerDataEntityFactory.AddLocalPlayerProfileDataComponents(Service.Get <CPDataEntityCollection>(), localPlayerData);
        LoginController loginController = new LoginController();

        Service.Set(loginController);
        loginController.SetNetworkConfig(networkConfig);
        IntegrationTestEx.FailIf(Service.Get <MixLoginCreateService>().NetworkConfigIsNotSet);
        yield return(null);
    }
Ejemplo n.º 3
0
        protected override IEnumerator setup()
        {
            base.gameObject.AddComponent <KeyChainManager>();
            GameSettings gameSettings = new GameSettings();

            Service.Set(gameSettings);
            ContentManifest       definition            = ContentManifestUtility.FromDefinitionFile("Configuration/embedded_content_manifest");
            GcsAccessTokenService gcsAccessTokenService = new GcsAccessTokenService(ConfigHelper.GetEnvironmentProperty <string>("GcsServiceAccountName"), new GcsP12AssetFileLoader(ConfigHelper.GetEnvironmentProperty <string>("GcsServiceAccountFile")));

            Service.Set((IGcsAccessTokenService)gcsAccessTokenService);
            string cdnUrl = ContentHelper.GetCdnUrl();
            string cpipeMappingFilename = ContentHelper.GetCpipeMappingFilename();
            CPipeManifestService cpipeManifestService = new CPipeManifestService(cdnUrl, cpipeMappingFilename, gcsAccessTokenService);

            Service.Set((ICPipeManifestService)cpipeManifestService);
            NullCPSwrveService cpSwrveService = new NullCPSwrveService();

            Service.Set((ICPSwrveService)cpSwrveService);
            Content content = new Content(definition);

            Service.Set(content);
            networkServicesConfig = NetworkController.GenerateNetworkServiceConfig(Disney.Kelowna.Common.Environment.Environment.LOCAL);
            ConnectionManager connectionManager = base.gameObject.AddComponent <ConnectionManager>();

            Service.Set(connectionManager);
            initEnvironmentManager();
            sessionManager = new SessionManager();
            Service.Set(sessionManager);
            Localizer localizer = Localizer.Instance;

            Service.Set(localizer);
            Language language = LocalizationLanguage.GetLanguage();

            localizer.Language       = language;
            localizer.LanguageString = LocalizationLanguage.GetLanguageString(language);
            AppTokensFilePath tokensFilePath = new AppTokensFilePath(Localizer.DEFAULT_TOKEN_LOCATION, Platform.global);
            bool tokensLoaded = false;

            Service.Get <Localizer>().LoadTokensFromLocalJSON(tokensFilePath, delegate
            {
                Debug.Log("Tokens for " + localizer.LanguageString + " have been loaded.");
                tokensLoaded = true;
            });
            while (!tokensLoaded)
            {
                yield return(null);
            }
            mixLoginCreateService = new MixLoginCreateService();
            Service.Set(mixLoginCreateService);
            IntegrationTestEx.FailIf(!mixLoginCreateService.NetworkConfigIsNotSet);
            mixLoginCreateService.SetNetworkConfig(networkServicesConfig);
            IntegrationTestEx.FailIf(mixLoginCreateService.NetworkConfigIsNotSet);
            yield return(null);
        }
Ejemplo n.º 4
0
        protected override IEnumerator runTest()
        {
            Service.Set(new Content(ContentManifestUtility.FromDefinitionFile("Configuration/embedded_content_manifest")));
            GameData gameData = new GameData();

            Service.Set(gameData);
            Service.Set((IGameData)gameData);
            gameData.Init(new Type[1] {
                typeof(EmoteDefinition)
            });
            emoteList = EmoteManager.GetAllEmoteCharacters();
            CreateChatBarText();
            yield return(EmojiFontTest());
        }
Ejemplo n.º 5
0
        private void Awake()
        {
            Service.ResetAll();
            Service.Set(new EventDispatcher());
            Service.Set((JsonService) new LitJsonService());
            GameObject gameObject = GameObject.Find("CoroutineRunner");

            if (gameObject != null)
            {
                UnityEngine.Object.Destroy(gameObject);
            }
            gameObject = new GameObject("CoroutineRunner");
            gameObject.AddComponent <CoroutineRunner>();
            ContentManifest manifest = ContentManifestUtility.FromDefinitionFile("Configuration/embedded_content_manifest");
            Content         instance = new Content(manifest);

            Service.Set(instance);
            ErrorsMap errorsMap = new ErrorsMap();

            errorsMap.LoadErrorJson("Errors/errors.json");
            Service.Set(errorsMap);
        }
 protected virtual ContentManifest generateManifest()
 {
     return(ContentManifestUtility.FromDefinitionFile("Configuration/embedded_content_manifest"));
 }