Axiom.Core.Node.NotifyOfNewParent C# (CSharp) Method

NotifyOfNewParent() protected method

protected NotifyOfNewParent ( Node newParent ) : void
newParent Node
return void
		protected virtual void NotifyOfNewParent( Node newParent )
		{
			parent = newParent;
			isParentNotified = false;
			NeedUpdate();
		}

Usage Example

Beispiel #1
0
		/// <summary>
		///    Adds a node to the list of children of this node.
		/// </summary>
		public void AddChild( Node child )
		{
			string childName = child.Name;
			if ( child == this )
				throw new ArgumentException( string.Format( "Node '{0}' cannot be added as a child of itself.", childName ) );
			if ( childNodes.ContainsKey( childName ) )
				throw new ArgumentException( string.Format( "Node '{0}' already has a child node with the name '{1}'.", this.name, childName ) );

			child.RemoveFromParent();
			childNodes.Add( childName, child );

			child.NotifyOfNewParent( this );
		}
All Usage Examples Of Axiom.Core.Node::NotifyOfNewParent