コード例 #1
0
 public override int Traverse()
 {
     // Importing doesn't fill group data. Do it here for now. TODO: Fix
     while (outputKnobs.Count > groupCount)
     {
         groups.Add(new ConditionGroup
         {
             output = outputKnobs[groupCount],
             input  = inputKnobs[groupCount + 1]
         });
         groupCount++;
     }
     for (int i = 0; i < groups.Count; i++)
     {
         if (groups[i].input.connected())
         {
             var connections = groups[i].input.connections;
             for (int j = 0; j < connections.Count; j++)
             {
                 if (!(connections[j].body is ICondition))
                 {
                     continue;
                 }
                 ICondition condition = connections[j].body as ICondition;
                 condition.Init(0);
             }
         }
     }
     Calculate();
     return(-1);
 }
コード例 #2
0
 public void Init()
 {
     condition.Init();
 }