// addChild helper, faster than insertChild public void AppendChild(CCSprite sprite) { IsReorderChildDirty = true; if (TextureAtlas.TotalQuads == TextureAtlas.Capacity) { IncreaseAtlasCapacity(); } Descendants.Add(sprite); int index = Descendants.Count - 1; sprite.AtlasIndex = index; sprite.BatchNode = this; TextureAtlas.UpdateQuad(ref sprite.transformedQuad, index); // add children recursively CCRawList <CCNode> children = sprite.Children; if (children != null && children.Count > 0) { CCNode[] elements = children.Elements; int count = children.Count; for (int i = 0; i < count; i++) { AppendChild((CCSprite)elements[i]); } } }
public void AddSubsymbol(ISymbolInformation child) { if (Descendants == null) { Descendants = new List <ISymbolInformation>(); } Descendants.Add(child); }
public void AddDescendant(ASTNode node) { Descendants.Add(node); node.Parent = this; }