Beispiel #1
0
 public bool CheckConditions(Action _action)
 {
     if (this.waitForConditions != null)
     {
         Dictionary <int, bool> .Enumerator enumerator = this.waitForConditions.GetEnumerator();
         while (enumerator.MoveNext())
         {
             KeyValuePair <int, bool> current = enumerator.Current;
             int key = current.Key;
             if ((key >= 0) && (key < _action.GetConditionCount()))
             {
                 KeyValuePair <int, bool> pair2 = enumerator.Current;
                 if (_action.GetCondition(_action.GetTrack(key)) != pair2.Value)
                 {
                     return(false);
                 }
             }
         }
     }
     return(true);
 }
 public bool CheckConditions(Action _action)
 {
     if (this.waitForConditions != null)
     {
         Dictionary <int, bool> .Enumerator enumerator = this.waitForConditions.GetEnumerator();
         while (enumerator.MoveNext())
         {
             KeyValuePair <int, bool> current = enumerator.get_Current();
             int key = current.get_Key();
             if (key >= 0 && key < _action.GetConditionCount())
             {
                 bool condition = _action.GetCondition(_action.GetTrack(key));
                 KeyValuePair <int, bool> current2 = enumerator.get_Current();
                 if (condition != current2.get_Value())
                 {
                     return(false);
                 }
             }
         }
     }
     return(true);
 }