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 "ICON": if (FillTexture == null) { FillTexture = new SimpleSubrecord <String>(); } FillTexture.ReadBinary(reader); break; case "ICO2": if (ParticleShaderTexture == null) { ParticleShaderTexture = new SimpleSubrecord <String>(); } ParticleShaderTexture.ReadBinary(reader); break; case "NAM7": if (HolesTexture == null) { HolesTexture = new SimpleSubrecord <String>(); } HolesTexture.ReadBinary(reader); break; case "DATA": if (Data == null) { Data = new EffectShaderData(); } Data.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("FillTexture", false, out subEle)) { if (FillTexture == null) { FillTexture = new SimpleSubrecord <String>(); } FillTexture.ReadXML(subEle, master); } if (ele.TryPathTo("ParticleShaderTexture", false, out subEle)) { if (ParticleShaderTexture == null) { ParticleShaderTexture = new SimpleSubrecord <String>(); } ParticleShaderTexture.ReadXML(subEle, master); } if (ele.TryPathTo("HolesTexture", false, out subEle)) { if (HolesTexture == null) { HolesTexture = new SimpleSubrecord <String>(); } HolesTexture.ReadXML(subEle, master); } if (ele.TryPathTo("Data", false, out subEle)) { if (Data == null) { Data = new EffectShaderData(); } Data.ReadXML(subEle, master); } }
public EffectShader(SimpleSubrecord <String> EditorID, SimpleSubrecord <String> FillTexture, SimpleSubrecord <String> ParticleShaderTexture, SimpleSubrecord <String> HolesTexture, EffectShaderData Data) { this.EditorID = EditorID; this.Data = Data; }
public EffectShader() { EditorID = new SimpleSubrecord <String>("EDID"); Data = new EffectShaderData("DATA"); }