Exemple #1
0
        public void SetUp()
        {
            const string sectionPrefabPath =
                "Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuilderProjectsPanel/Prefabs/SectionScenesView.prefab";
            var sectionPrefab = AssetDatabase.LoadAssetAtPath <GameObject>(sectionPrefabPath);

            const string sceneCardPrefabPath =
                "Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuilderProjectsPanel/Prefabs/SceneCardView.prefab";
            var sceneCardPrefab = AssetDatabase.LoadAssetAtPath <SceneCardView>(sceneCardPrefabPath);

            sectionController = new SectionScenesController();
            scenesController  = new ScenesViewController(sceneCardPrefab);

            IDeployedSceneListener deployedSceneListener = sectionController;
            IProjectSceneListener  projectSceneListener  = sectionController;

            scenesController.OnDeployedSceneAdded   += deployedSceneListener.OnSceneAdded;
            scenesController.OnDeployedSceneRemoved += deployedSceneListener.OnSceneRemoved;
            scenesController.OnDeployedScenesSet    += deployedSceneListener.OnSetScenes;
            scenesController.OnProjectSceneAdded    += projectSceneListener.OnSceneAdded;
            scenesController.OnProjectSceneRemoved  += projectSceneListener.OnSceneRemoved;
            scenesController.OnProjectScenesSet     += projectSceneListener.OnSetScenes;

            deployedSceneListener.OnSetScenes(scenesController.deployedScenes);
            projectSceneListener.OnSetScenes(scenesController.projectScenes);
        }
Exemple #2
0
    SectionBase ISectionFactory.GetSectionController(SectionsController.SectionId id)
    {
        SectionBase result = null;

        switch (id)
        {
        case SectionsController.SectionId.SCENES_MAIN:
            result = new SectionScenesController();
            break;

        case SectionsController.SectionId.SCENES_DEPLOYED:
            break;

        case SectionsController.SectionId.SCENES_PROJECT:
            result = new SectionProjectScenesController();
            break;

        case SectionsController.SectionId.LAND:
            break;

        case SectionsController.SectionId.SETTINGS_PROJECT_GENERAL:
            result = new SectionSceneGeneralSettingsController();
            break;
        }

        return(result);
    }
Exemple #3
0
        public void SetUp()
        {
            const string sceneCardPrefabPath =
                "Assets/Scripts/MainScripts/DCL/Controllers/HUD/BuilderProjectsPanel/Prefabs/SceneCardView.prefab";
            var sceneCardPrefab = AssetDatabase.LoadAssetAtPath <SceneCardView>(sceneCardPrefabPath);

            sectionController = new SectionScenesController();
            scenesController  = new ScenesViewController(sceneCardPrefab);

            scenesController.AddListener((IDeployedSceneListener)sectionController);
            scenesController.AddListener((IProjectSceneListener)sectionController);
        }
Exemple #4
0
    SectionBase ISectionFactory.GetSectionController(SectionId id)
    {
        SectionBase result = null;

        switch (id)
        {
        case SectionId.SCENES_MAIN:
            result = new SectionScenesController();
            break;

        case SectionId.SCENES_DEPLOYED:
            result = new SectionDeployedScenesController();
            break;

        case SectionId.SCENES_PROJECT:
            result = new SectionProjectScenesController();
            break;

        case SectionId.LAND:
            result = new SectionLandController();
            break;

        case SectionId.SETTINGS_PROJECT_GENERAL:
            result = new SectionSceneGeneralSettingsController();
            break;

        case SectionId.SETTINGS_PROJECT_CONTRIBUTORS:
            result = new SectionSceneContributorsSettingsController();
            break;

        case SectionId.SETTINGS_PROJECT_ADMIN:
            result = new SectionSceneAdminsSettingsController();
            break;
        }

        return(result);
    }