internal bool TryGetExtensionIndexOfType(RWNodeType type, out int index) { index = Children.FindIndex(n => n.Type == type); if (index != -1) return true; else return false; }
/// <summary> /// Initialize a RenderWare node using the given RenderWare node type. /// </summary> protected RWNode(RWNodeType type) { _type = type; _size = 0; _rawVersion = ExportVersion; _parent = null; }
/// <summary> /// Initializer only to be called by <see cref="RWNodeFactory"/>. /// </summary> internal RWNode(RWNodeFactory.RWNodeInfo header, BinaryReader reader) { _type = header.Type; _size = header.Size; _rawVersion = header.Version; Parent = header.Parent; _data = reader.ReadBytes((int)_size); switch (_type) { case RWNodeType.RMDParticleList: reader.AlignPosition(16); break; } }
/// <summary> /// Initializer only to be called by <see cref="RWNodeFactory"/>. /// </summary> internal RWNode(RWNodeFactory.RWNodeInfo header) { _type = header.Type; _size = header.Size; _rawVersion = header.Version; Parent = header.Parent; }
/// <summary> /// Initialize a RenderWare node using the given RenderWare node type and parent node. /// </summary> protected RWNode(RWNodeType type, RWNode parent) { _type = type; _size = 0; _rawVersion = ExportVersion; Parent = parent; }