public Tree() { EditorID = new SimpleSubrecord<String>("EDID"); ObjectBounds = new ObjectBounds("OBND"); Model = new Model(); SpeedtreeSeeds = new SpeedtreeSeeds("SNAM"); Data = new TreeData("CNAM"); BillboardDimensions = new BillboardDimensions("BNAM"); }
public Tree(SimpleSubrecord<String> EditorID, ObjectBounds ObjectBounds, Model Model, SimpleSubrecord<String> LargeIcon, SimpleSubrecord<String> SmallIcon, SpeedtreeSeeds SpeedtreeSeeds, TreeData Data, BillboardDimensions BillboardDimensions) { this.EditorID = EditorID; this.ObjectBounds = ObjectBounds; this.Model = Model; this.SpeedtreeSeeds = SpeedtreeSeeds; this.Data = Data; this.BillboardDimensions = BillboardDimensions; }
public override void ReadData(ESPReader reader, long dataEnd) { while (reader.BaseStream.Position < dataEnd) { string subTag = reader.PeekTag(); switch (subTag) { case "EDID": if (EditorID == null) EditorID = new SimpleSubrecord<String>(); EditorID.ReadBinary(reader); break; case "OBND": if (ObjectBounds == null) ObjectBounds = new ObjectBounds(); ObjectBounds.ReadBinary(reader); break; case "MODL": if (Model == null) Model = new Model(); Model.ReadBinary(reader); break; case "ICON": if (LargeIcon == null) LargeIcon = new SimpleSubrecord<String>(); LargeIcon.ReadBinary(reader); break; case "MICO": if (SmallIcon == null) SmallIcon = new SimpleSubrecord<String>(); SmallIcon.ReadBinary(reader); break; case "SNAM": if (SpeedtreeSeeds == null) SpeedtreeSeeds = new SpeedtreeSeeds(); SpeedtreeSeeds.ReadBinary(reader); break; case "CNAM": if (Data == null) Data = new TreeData(); Data.ReadBinary(reader); break; case "BNAM": if (BillboardDimensions == null) BillboardDimensions = new BillboardDimensions(); BillboardDimensions.ReadBinary(reader); break; default: throw new Exception(); } } }
public override void ReadDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("EditorID", false, out subEle)) { if (EditorID == null) EditorID = new SimpleSubrecord<String>(); EditorID.ReadXML(subEle, master); } if (ele.TryPathTo("ObjectBounds", false, out subEle)) { if (ObjectBounds == null) ObjectBounds = new ObjectBounds(); ObjectBounds.ReadXML(subEle, master); } if (ele.TryPathTo("Model", false, out subEle)) { if (Model == null) Model = new Model(); Model.ReadXML(subEle, master); } if (ele.TryPathTo("Icon/Large", false, out subEle)) { if (LargeIcon == null) LargeIcon = new SimpleSubrecord<String>(); LargeIcon.ReadXML(subEle, master); } if (ele.TryPathTo("Icon/Small", false, out subEle)) { if (SmallIcon == null) SmallIcon = new SimpleSubrecord<String>(); SmallIcon.ReadXML(subEle, master); } if (ele.TryPathTo("SpeedtreeSeeds", false, out subEle)) { if (SpeedtreeSeeds == null) SpeedtreeSeeds = new SpeedtreeSeeds(); SpeedtreeSeeds.ReadXML(subEle, master); } if (ele.TryPathTo("Data", false, out subEle)) { if (Data == null) Data = new TreeData(); Data.ReadXML(subEle, master); } if (ele.TryPathTo("BillboardDimensions", false, out subEle)) { if (BillboardDimensions == null) BillboardDimensions = new BillboardDimensions(); BillboardDimensions.ReadXML(subEle, master); } }