예제 #1
0
 public NavigationMesh(SimpleSubrecord <String> EditorID, SimpleSubrecord <UInt32> Version, NavMeshData Data, SimpleSubrecord <Byte[]> Vertices, SimpleSubrecord <Byte[]> Triangles, SimpleSubrecord <Byte[]> Unknown, NavMeshDoorList Doors, SimpleSubrecord <Byte[]> Grid, NavMeshExternalConnectionList ExternalConnections)
 {
 }
예제 #2
0
        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 "NVER":
                    if (Version == null)
                    {
                        Version = new SimpleSubrecord <UInt32>();
                    }

                    Version.ReadBinary(reader);
                    break;

                case "DATA":
                    if (Data == null)
                    {
                        Data = new NavMeshData();
                    }

                    Data.ReadBinary(reader);
                    break;

                case "NVVX":
                    if (Vertices == null)
                    {
                        Vertices = new SimpleSubrecord <Byte[]>();
                    }

                    Vertices.ReadBinary(reader);
                    break;

                case "NVTR":
                    if (Triangles == null)
                    {
                        Triangles = new SimpleSubrecord <Byte[]>();
                    }

                    Triangles.ReadBinary(reader);
                    break;

                case "NVCA":
                    if (Unknown == null)
                    {
                        Unknown = new SimpleSubrecord <Byte[]>();
                    }

                    Unknown.ReadBinary(reader);
                    break;

                case "NVDP":
                    if (Doors == null)
                    {
                        Doors = new NavMeshDoorList();
                    }

                    Doors.ReadBinary(reader);
                    break;

                case "NVGD":
                    if (Grid == null)
                    {
                        Grid = new SimpleSubrecord <Byte[]>();
                    }

                    Grid.ReadBinary(reader);
                    break;

                case "NVEX":
                    if (ExternalConnections == null)
                    {
                        ExternalConnections = new NavMeshExternalConnectionList();
                    }

                    ExternalConnections.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
예제 #3
0
        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("Version", false, out subEle))
            {
                if (Version == null)
                {
                    Version = new SimpleSubrecord <UInt32>();
                }

                Version.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Data", false, out subEle))
            {
                if (Data == null)
                {
                    Data = new NavMeshData();
                }

                Data.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Vertices", false, out subEle))
            {
                if (Vertices == null)
                {
                    Vertices = new SimpleSubrecord <Byte[]>();
                }

                Vertices.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Triangles", false, out subEle))
            {
                if (Triangles == null)
                {
                    Triangles = new SimpleSubrecord <Byte[]>();
                }

                Triangles.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Unknown", false, out subEle))
            {
                if (Unknown == null)
                {
                    Unknown = new SimpleSubrecord <Byte[]>();
                }

                Unknown.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Doors", false, out subEle))
            {
                if (Doors == null)
                {
                    Doors = new NavMeshDoorList();
                }

                Doors.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Grid", false, out subEle))
            {
                if (Grid == null)
                {
                    Grid = new SimpleSubrecord <Byte[]>();
                }

                Grid.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("ExternalConnections", false, out subEle))
            {
                if (ExternalConnections == null)
                {
                    ExternalConnections = new NavMeshExternalConnectionList();
                }

                ExternalConnections.ReadXML(subEle, master);
            }
        }