示例#1
0
        public override void Deserialize(DataStream dataStream)
        {
            entries.Clear();

            this.listType = (DDFType)dataStream.ReadByte();

            ushort count = dataStream.ReadUShort();

            for (int i = 0; i < count; i++)
            {
                DDFBase entry = DDFFactory.Create(listType);

                entry.Deserialize(dataStream);

                entries.Add(entry);
            }
        }
示例#2
0
        public override void Deserialize(DataStream dataStream)
        {
            entries.Clear();

            ushort count = dataStream.ReadUShort();

            for (int i = 0; i < count; i++)
            {
                DDFString entryName = new DDFString();

                entryName.Deserialize(dataStream);
                DDFType entryType = (DDFType)dataStream.ReadByte();
                DDFBase entry     = DDFFactory.Create(entryType);

                entry.Deserialize(dataStream);

                entries.Add(entryName.Value, entry);
            }
        }
示例#3
0
 public void Add(string name, DDFBase value)
 {
     // Must be a unique name.
     entries.Add(name, value);
 }
示例#4
0
 public int IndexOf(DDFBase entry)
 {
     return(entries.IndexOf(entry));
 }
示例#5
0
 public bool Contains(DDFBase entry)
 {
     return(entries.Contains(entry));
 }
示例#6
0
 public void Remove(DDFBase entry)
 {
     entries.Remove(entry);
 }
示例#7
0
 public void Add(DDFBase entry)
 {
     entries.Add(entry);
 }