Esempio n. 1
0
 private static void WriteTimelines(IList <KeyValuePair <string, GMTimeLine> > _data, Stream _s, IFF _iff)
 {
     WriteDataKVP(_data, _s, _iff, delegate(KeyValuePair <string, GMTimeLine> _kvp, Stream __s, IFF __iff, long __index)
     {
         __s.PatchOffset(__index);
         __iff.AddString(__s, _kvp.Key);
         GMTimeLine value = _kvp.Value;
         __s.WriteInteger(value.Entries.Count);
         foreach (KeyValuePair <int, GMEvent> entry in value.Entries)
         {
             __s.WriteInteger(entry.Key);
             __iff.AddPatch(__s, entry.Value);
         }
         foreach (KeyValuePair <int, GMEvent> entry2 in value.Entries)
         {
             __iff.SetOffset(__s, entry2.Value, __s.Position);
             WriteGMEvent(entry2.Value, __s, __iff);
         }
     });
 }
Esempio n. 2
0
 public void RemoveDND()
 {
     if (!DNDRemoved)
     {
         DNDRemoved = true;
         foreach (KeyValuePair <string, GMObject> @object in Objects)
         {
             GMObject value = @object.Value;
             if (value != null)
             {
                 foreach (IList <KeyValuePair <int, GMEvent> > @event in value.Events)
                 {
                     using (IEnumerator <KeyValuePair <int, GMEvent> > enumerator3 = @event.GetEnumerator())
                     {
                         while (enumerator3.MoveNext())
                         {
                             RemoveEventDND(_ev: enumerator3.Current.Value, _name: @object.Key);
                         }
                     }
                 }
             }
         }
         foreach (KeyValuePair <string, GMTimeLine> timeLine in TimeLines)
         {
             GMTimeLine value3 = timeLine.Value;
             if (value3 != null)
             {
                 using (IEnumerator <KeyValuePair <int, GMEvent> > enumerator5 = value3.Entries.GetEnumerator())
                 {
                     while (enumerator5.MoveNext())
                     {
                         RemoveEventDND(_ev: enumerator5.Current.Value, _name: timeLine.Key);
                     }
                 }
             }
         }
     }
 }
Esempio n. 3
0
        public void TimeLine_Load(Stream _s)
        {
            int num  = _s.ReadInteger();
            int num2 = _s.ReadInteger();

            for (int i = 0; i < num2; i++)
            {
                Stream stream = _s;
                if (num == 800)
                {
                    stream = _s.ReadStreamC();
                }
                bool flag = stream.ReadBoolean();
                KeyValuePair <string, GMTimeLine> item = default(KeyValuePair <string, GMTimeLine>);
                if (flag)
                {
                    string     key   = stream.ReadString();
                    GMTimeLine value = new GMTimeLine(this, stream);
                    item = new KeyValuePair <string, GMTimeLine>(key, value);
                }
                TimeLines.Add(item);
            }
        }