public void SetFromTreeNodes(TreeNode Root) { Items = new MaterialsShotsItem[Items.Length]; for (int i = 0; i < Items.Length; i++) { TreeNode ChildNode = Root.Nodes[i]; MaterialsShotsItem Entry = (MaterialsShotsItem)ChildNode.Tag; Items[i] = Entry; } }
public void ReadFromFile(BinaryReader reader) { unk0 = reader.ReadUInt32(); uint count1 = reader.ReadUInt32(); uint count2 = reader.ReadUInt32(); Items = new MaterialsShotsItem[count1]; for (int i = 0; i < Items.Length; i++) { MaterialsShotsItem Item = new MaterialsShotsItem(); Item.ID = reader.ReadUInt32(); Item.MaterialName = StringHelpers.ReadStringBuffer(reader, 32); Item.GUID_Part0 = reader.ReadUInt32(); Item.GUID_Part1 = reader.ReadUInt32(); Item.SoundSwitch = XBinAkHashName.ConstructAndReadFromFile(reader); Item.Penetration = reader.ReadSingle(); Item.Particle = reader.ReadUInt32(); Item.Decal = reader.ReadUInt32(); Item.DecalCold = reader.ReadUInt32(); Items[i] = Item; } }