Nez.Transform.getChild C# (CSharp) Method

getChild() public method

returns the Transform child at index
public getChild ( int index ) : Transform
index int Index.
return Transform
		public Transform getChild( int index )
		{
			return _children[index];
		}
	

Usage Example

Exemplo n.º 1
0
        /// <summary>
        /// removes the Entity from the scene and destroys all children
        /// </summary>
        public void destroy()
        {
            _isDestroyed = true;
            scene.entities.remove(this);
            transform.parent = null;

            // destroy any children we have
            for (var i = transform.childCount - 1; i >= 0; i--)
            {
                var child = transform.getChild(i);
                child.entity.destroy();
            }
        }
All Usage Examples Of Nez.Transform::getChild