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

            foreach (Transform transform in transforms)
            {
                pseudoScene.AddChild(transform);
            }
        }
Exemplo 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);
            }
        }
Exemplo 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;
                }
            }
        }
Exemplo 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);
            }
        }