Пример #1
0
 public bool IsParallelBlockFinished(ActionEntryContainer container)
 {
     if (EntryType == ActionEntryType.ParallelBlock)
     {
         foreach (var childEntry in GetChildEntries(container))
         {
             if (!childEntry.IsParallelBlockFinished(container))
             {
                 return(false);
             }
         }
         return(true);
     }
     else
     {
         if (!HasNext)
         {
             return(PrimaryAction == null || PrimaryAction.IsDone());
         }
         int last = NextId;
         int next = container.GetEntry(last).NextId;
         while (next != kNotExistId)
         {
             last = next;
             next = container.GetEntry(next).NextId;
         }
         return((PrimaryAction == null || PrimaryAction.IsDone()) && (container.GetEntry(last).PrimaryAction == null || container.GetEntry(last).PrimaryAction.IsDone()));
     }
 }
Пример #2
0
 public List <ActionEntry> GetChildEntries(ActionEntryContainer container)
 {
     return(childEntryIds.Select(id => container.GetEntry(id)).ToList());
 }