Ejemplo n.º 1
0
        /// <summary>
        /// Adds an attachment to the scene node.
        /// 
        /// Reserved for use almost exclusively by SceneNodeAttachment because it 
        /// doesn't change the Owner property of the attachment itself.
        /// 
        /// If you need add an attachment to a scene-node, set the Owner property of the attachment instead
        /// </summary>
        /// <param name="attachment">The attachment to add</param>
        public void AddAttachment(SceneNodeAttachment attachment)
        {
            if (null == attachment)
            {
                throw new NullReferenceException("Tried to add a null attachment to the SceneNode named '" + Name + "'");
            }

            _attachments.Add(attachment);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Removes an attachment from the scene node.
        /// 
        /// Reserved for use almost exclusively by SceneNodeAttachment because it 
        /// doesn't change the Owner property of the attachment itself.
        /// 
        /// If you need remove an attachment from a scene-node, set the Owner property of the attachment to null instead
        /// </summary>
        /// <param name="attachment"></param>
        public void RemoveAttachment(SceneNodeAttachment attachment)
        {
            if (null == attachment)
            {
                throw new NullReferenceException("Tried to remove a null attachment from the SceneNode named '" + Name + "'");
            }

            _attachments.Remove(attachment);
        }