예제 #1
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public override void Dispose()
        {
            foreach (var shape in colliderShapes)
            {
                InternalCompoundShape.RemoveChildShape(shape.InternalShape);
                shape.Dispose();
            }
            colliderShapes.Clear();

            base.Dispose();
        }
예제 #2
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public override void Dispose()
        {
            foreach (var shape in colliderShapes)
            {
                InternalCompoundShape.RemoveChildShape(shape.InternalShape);

                if (!shape.IsPartOfAsset)
                {
                    shape.Dispose();
                }
                else
                {
                    shape.Parent = null;
                }
            }
            colliderShapes.Clear();

            base.Dispose();
        }
예제 #3
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public override void Dispose()
        {
            foreach (var shape in colliderShapes)
            {
                InternalCompoundShape.RemoveChildShape(shape.InternalShape);

                if (!shape.DoNotDispose && !Xenko.Engine.SceneSystem.physicsDoNotDisposeNextRemoval)
                {
                    shape.Dispose();
                }
                else
                {
                    shape.Parent = null;
                }
            }
            colliderShapes.Clear();

            base.Dispose();
        }
예제 #4
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public override void Dispose()
        {
            foreach (var shape in colliderShapes)
            {
                InternalCompoundShape.RemoveChildShape(shape.InternalShape);

                if (!shape.DoNotDispose && !ColliderShape.DoNotDisposeAnyOnNextDetach)
                {
                    shape.Dispose();
                }
                else
                {
                    shape.Parent = null;
                }
            }
            colliderShapes.Clear();

            base.Dispose();
        }