Esempio n. 1
0
        /// <summary>
        /// Removes a child node from parent node, returns child node, possible issues with how it is detached
        /// </summary>
        /// <param name="node">Node you wish to detach</param>
        /// <returns>Detached node</returns>
        public SceneNode detachChild(ref SceneNode node)
        {
            foreach (SceneNode nodel in mChildren)
            {
                if (nodel == node)
                {
                    nodel.mParent = null;
                    mChildren.Remove(nodel);
                    return nodel;

                }

            }
            return null;
        }
Esempio n. 2
0
 public void attachChild(SceneNode child)
 {
     child.mParent = this; mChildren.Add(child);
 }
Esempio n. 3
0
 //constructor
 public SceneNode()
 {
     mParent = null; mChildren = new List<SceneNode>(); this.Position = new Vector2f(0, 0);
 }