Exemple #1
0
 public void Apply(Linedef l)
 {
     if ((front != null) && (l.Front != null))
     {
         front.Apply(l.Front);
     }
     if ((back != null) && (l.Back != null))
     {
         back.Apply(l.Back);
     }
     l.ClearFlags();
     foreach (KeyValuePair <string, bool> f in flags)
     {
         l.SetFlag(f.Key, f.Value);
     }
     l.Action   = action;
     l.Activate = activate;
     l.Tag      = tag;
     for (int i = 0; i < l.Args.Length; i++)
     {
         l.Args[i] = args[i];
     }
     l.Fields.BeforeFieldsChange();
     l.Fields.Clear();
     foreach (KeyValuePair <string, UniValue> v in fields)
     {
         l.Fields.Add(v.Key, new UniValue(v.Value));
     }
 }
Exemple #2
0
 public void ClearFlags()
 {
     if (linedef.IsDisposed)
     {
         throw new ScriptRuntimeException("Linedef has been disposed, can't ClearFlags().");
     }
     linedef.ClearFlags();
 }