Esempio n. 1
0
        public void ClearChildren(bool wipe = true)
        {
            if (IsDetached)
            {
                return;
            }

            _children.Lock();
            foreach (Transform child in _children)
            {
                if (child.IsDetached)
                {
                    continue;
                }

                child.OnParentRemoved();
                child._parent = null;

                if (child.Entity.IsSceneFromTransformAncestor && child.Scene != null)
                {
                    child.Entity.SceneRemoved(wipe);
                }

                OnChildRemoved(child);
            }
            _children.Unlock();

            _children.Clear();
        }
Esempio n. 2
0
        public void Clear()
        {
            foreach (Coroutine c in _coroutines)
            {
                c.Stop();
            }

            _coroutines.Clear();
        }
Esempio n. 3
0
        /// <summary>
        /// Remove all IUpdatable, IRenderables and ISceneObject from Scene.
        /// </summary>
        /// <param name="wipe">Allow ISceneObject to be wiped after removed.</param>
        public void Clear(bool wipe = true)
        {
            _updatables.Clear();
            _renderables.Clear();

            foreach (ISceneObject sceneObject in _sceneObjects)
            {
                sceneObject.SceneRemoved(wipe);
            }

            _sceneObjects.Clear();
        }
Esempio n. 4
0
        public void ClearAll()
        {
            foreach (Coroutine coroutine in _runningCoroutines)
            {
                coroutine.Stop();
            }

            foreach (Coroutine coroutine in _pausedCoroutines)
            {
                coroutine.Stop();
            }

            _runningCoroutines.Clear();
            _pausedCoroutines.Clear();
        }