protected override IEnumerator setup()
        {
            yield return(base.setup());

            eventDispatcher = Service.Get <EventDispatcher>();
            Service.Set(SpashScreenCanvas);
            Service.Set(SpashScreenCanvas.gameObject.AddComponent <LoadingController>());
            base.gameObject.AddComponent <KeyChainManager>();
            Service.Set(new GameSettings());
            initDataModel();
            initContentAction();
            yield return(StartTestCoroutine(initSchedulerAction(), this, "initSchedulerAction"));

            initNetworkServices();
            SceneTransitionService sts = base.gameObject.AddComponent <SceneTransitionService>();

            sts.LoadingMode = LoadSceneMode.Additive;
            Service.Set(sts);
            TestZoneDefinition               = ScriptableObject.CreateInstance <ZoneDefinition>();
            TestZoneDefinition.ZoneName      = "EmptySceneForLoadingTests";
            TestZoneDefinition.SceneName     = "EmptySceneForLoadingTests";
            TestZoneDefinition.SceneFilePath = "Assets/Game/Core/Tests/IntegrationTests/ZoneAndSceneTransitionTests/EmptySceneForLoadingTests.unity";
            Manifest zoneManifest = ScriptableObject.CreateInstance <Manifest>();

            zoneManifest.Assets = new ScriptableObject[1] {
                TestZoneDefinition
            };
            zts = base.gameObject.AddComponent <ZoneTransitionService>();
            zts.SetZonesFromManifest(zoneManifest);
            Service.Set(zts);
            yield return(null);
        }
Esempio n. 2
0
    public override IEnumerator PerformFirstPass()
    {
        GameObject              go = Service.Get <GameObject>();
        ManifestContentKey      zoneDefinitionManifestContentKey = StaticGameDataUtils.GetManifestContentKey(typeof(ZoneDefinition));
        AssetRequest <Manifest> assetZoneRequest = Content.LoadAsync(zoneDefinitionManifestContentKey);
        ManifestContentKey      worldDefinitionManifestContentKey = StaticGameDataUtils.GetManifestContentKey(typeof(WorldDefinition));
        AssetRequest <Manifest> assetWorldRequest = Content.LoadAsync(worldDefinitionManifestContentKey);

        yield return(assetZoneRequest);

        yield return(assetWorldRequest);

        ZoneTransitionService service = go.AddComponent <ZoneTransitionService>();

        service.SetIglooSplashScreenKey(IglooSplashScreen);
        service.SetZonesFromManifest(assetZoneRequest.Asset);
        service.SetWorldsFromManifest(assetWorldRequest.Asset);
        Service.Set(service);
    }