示例#1
0
        public static PaiEntrySerializer Serialize(PaiEntry e)
        {
            var res = new PaiEntrySerializer()
            {
                Name         = e.Name,
                Target       = (byte)e.Target,
                UnkwnownData = e.UnkwnownData
            };

            res.Tags = new List <PaiTagSerializer>();
            foreach (var t in e.Tags)
            {
                res.Tags.Add(PaiTagSerializer.Serialize(t));
            }
            return(res);
        }
示例#2
0
        public static Pai1Serializer Serialize(Pai1Section p)
        {
            var res = new Pai1Serializer()
            {
                Textures  = p.Textures,
                Flags     = p.Flags,
                FrameSize = p.FrameSize
            };

            res.Entries = new List <PaiEntrySerializer>();
            foreach (var e in p.Entries)
            {
                res.Entries.Add(PaiEntrySerializer.Serialize(e));
            }
            return(res);
        }