Esempio n. 1
0
        public void AddToPseudoScene(string scene, IEnumerable <Transform> transforms)
        {
            HierarchyRootPseudoScene pseudoScene = GetPseudoScene(scene, true);

            foreach (Transform transform in transforms)
            {
                pseudoScene.AddChild(transform);
            }
        }
Esempio n. 2
0
        public void RemoveFromPseudoScene(string scene, Transform transform, bool deleteSceneIfEmpty)
        {
            HierarchyRootPseudoScene pseudoScene = GetPseudoScene(scene, false);

            if (pseudoScene == null)
            {
                return;
            }

            pseudoScene.RemoveChild(transform);

            if (deleteSceneIfEmpty && pseudoScene.Children.Count == 0)
            {
                DeletePseudoScene(scene);
            }
        }
Esempio n. 3
0
        public void DeletePseudoScene(string scene)
        {
            for (int i = 0; i < sceneDrawers.Count; i++)
            {
                HierarchyRootPseudoScene pseudoScene = sceneDrawers[i].Content as HierarchyRootPseudoScene;
                if (pseudoScene != null && pseudoScene.Name == scene)
                {
                    pseudoSceneDrawers.Remove(pseudoScene.Name);

                    sceneDrawers[i].Unbind();
                    sceneDrawers.RemoveAt(i);

                    searchSceneDrawers[i].Unbind();
                    searchSceneDrawers.RemoveAt(i);

                    return;
                }
            }
        }
Esempio n. 4
0
        public void RemoveFromPseudoScene(string scene, IEnumerable <Transform> transforms, bool deleteSceneIfEmpty)
        {
            HierarchyRootPseudoScene pseudoScene = GetPseudoScene(scene, false);

            if (pseudoScene == null)
            {
                return;
            }

            foreach (Transform transform in transforms)
            {
                pseudoScene.RemoveChild(transform);
            }

            if (deleteSceneIfEmpty && pseudoScene.Children.Count == 0)
            {
                DeletePseudoScene(scene);
            }
        }