Axiom.Components.Paging.Page.NotifyAttached C# (CSharp) Method

NotifyAttached() public method

Internal method to notify a page that it is attached
public NotifyAttached ( PagedWorldSection parent ) : void
parent PagedWorldSection
return void
        public void NotifyAttached(PagedWorldSection parent)
        {
            if (parent == null && mParent != null && mDebugNode != null)
            {
#warning unsure if movableobject is correct here
                // destroy while we have the chance
                List<MovableObject> nodes = (List<MovableObject>)mDebugNode.Objects;
                foreach (MovableObject m in nodes)
                    mParent.SceneManager.DestroyMovableObject(m);

                mDebugNode.RemoveAndDestroyAllChildren();
                mParent.SceneManager.DestroySceneNode(mDebugNode.Name);
                mDebugNode = null;
            }

            mParent = parent;

        }
        /// <summary>

Usage Example

Beispiel #1
0
 /// <summary>
 /// Detach a page to this section. 
 /// </summary>
 /// <param name="page"></param>
 public virtual void DetachPage(Page page)
 {
     Page pageFound;
     if (mPages.TryGetValue(page.PageID, out pageFound))
     {
         if (page != pageFound)
         {
             mPages.Remove(pageFound.PageID);
             page.NotifyAttached(null);
         }
     }
 }
All Usage Examples Of Axiom.Components.Paging.Page::NotifyAttached