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); }
void OnSectionShow(SectionBase sectionBase) { if (sectionBase is IDeployedSceneListener deployedSceneListener) { scenesViewController.AddListener(deployedSceneListener); } if (sectionBase is IProjectSceneListener projectSceneListener) { scenesViewController.AddListener(projectSceneListener); } if (sectionBase is ISelectSceneListener selectSceneListener) { scenesViewController.AddListener(selectSceneListener); } if (sectionBase is ILandsListener landsListener) { landController.AddListener(landsListener); } searchBarView.SetSearchBar(sectionBase.searchHandler, sectionBase.searchBarConfig); }
private void SetView() { scenesViewController.AddListener((IDeployedSceneListener)view); scenesViewController.AddListener((IProjectSceneListener)view); }