Axiom.Core.Node.Update C# (CSharp) Метод

Update() защищенный Метод

Internal method to update the Node. Updates this node and any relevant children to incorporate transforms etc. Don't call this yourself unless you are writing a SceneManager implementation.
protected Update ( bool updateChildren, bool hasParentChanged ) : void
updateChildren bool If true, the update cascades down to all children. Specify false if you wish to /// update children separately, e.g. because of a more selective SceneManager implementation.
hasParentChanged bool if true then this will update its derived properties (scale, orientation, position) accoarding to the parent's
Результат void
		protected internal virtual void Update( bool updateChildren, bool hasParentChanged )
		{
			isParentNotified = false;

			// skip update if not needed
			if ( !updateChildren && !needParentUpdate && !needChildUpdate && !hasParentChanged )
				return;

			// see if need to process everyone
			if ( needParentUpdate || hasParentChanged )
			{
				// update transforms from parent
				UpdateFromParent();

				if ( NodeUpdated != null )
				{
					NodeUpdated( this );
				}
			}

			// see if we need to process all
			if ( needChildUpdate || hasParentChanged )
			{
				// update all children
				foreach ( Node child in childNodes.Values )
				{
					child.Update( true, true );
				}

				childrenToUpdate.Clear();
			}
			else
			{
				// just update selected children
				foreach ( Node child in childrenToUpdate.Values )
				{
					child.Update( true, false );
				}

				// clear the list
				childrenToUpdate.Clear();
			}

			// reset the flag
			needChildUpdate = false;
		}