コード例 #1
0
        private void DeleteAttachedLWF(Movie parent, LWFContainer lwfContainer,
                                       bool destroy = true, bool deleteFromDetachedLWFs = true)
        {
            string attachName  = lwfContainer.child.attachName;
            int    attachDepth = lwfContainer.child.depth;

            parent.m_attachedLWFs.Remove(attachName);
            parent.m_attachedLWFList[attachDepth] = null;
            if (deleteFromDetachedLWFs)
            {
                parent.m_detachedLWFs.Remove(attachName);
            }
            parent.ShrinkAttachedLWFList();
            if (destroy && lwfContainer.child.detachHandler != null)
            {
                lwfContainer.child.detachHandler(lwfContainer.child);
                lwfContainer.child.parent        = null;
                lwfContainer.child.detachHandler = null;
                lwfContainer.child.attachName    = null;
                lwfContainer.child.depth         = -1;
            }
        }
コード例 #2
0
ファイル: lwf_movieat.cs プロジェクト: neojjang/lwf
        private void DeleteAttachedLWF(Movie parent, LWFContainer lwfContainer,
		bool destroy = true, bool deleteFromDetachedLWFs = true)
        {
            string attachName = lwfContainer.child.attachName;
            int attachDepth = lwfContainer.child.depth;
            parent.m_attachedLWFs.Remove(attachName);
            parent.m_attachedLWFList[attachDepth] = null;
            if (deleteFromDetachedLWFs)
            parent.m_detachedLWFs.Remove(attachName);
            parent.ShrinkAttachedLWFList();
            if (destroy && lwfContainer.child.detachHandler != null) {
            lwfContainer.child.detachHandler(lwfContainer.child);
            lwfContainer.child.parent = null;
            lwfContainer.child.detachHandler = null;
            lwfContainer.child.attachName = null;
            lwfContainer.child.depth = -1;
            }
        }