Exemple #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);
            }
        }
Exemple #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);
            }
        }
Exemple #3
0
 public void Add(string name, DDFBase value)
 {
     // Must be a unique name.
     entries.Add(name, value);
 }
Exemple #4
0
 public int IndexOf(DDFBase entry)
 {
     return(entries.IndexOf(entry));
 }
Exemple #5
0
 public bool Contains(DDFBase entry)
 {
     return(entries.Contains(entry));
 }
Exemple #6
0
 public void Remove(DDFBase entry)
 {
     entries.Remove(entry);
 }
Exemple #7
0
 public void Add(DDFBase entry)
 {
     entries.Add(entry);
 }