Beispiel #1
0
        internal BehaviorUpdateFamily CreateFamily(Type behaviorType, bool updateFrozen)
        {
            var family = new BehaviorUpdateFamily(behaviorType, updateFrozen);

            familyIndexMap.Add(family, families.Count);
            families.Add(family);
            afterFamilyIndices.Add(new List <int>());
            shouldSortFamilies = true;
            return(family);
        }
Beispiel #2
0
 internal void AddDependency(BehaviorUpdateFamily before, BehaviorUpdateFamily after)
 {
     if (!familyIndexMap.TryGetValue(before, out var beforeIndex) ||
         !familyIndexMap.TryGetValue(after, out var afterIndex)
         )
     {
         throw new InvalidOperationException();
     }
     afterFamilyIndices[beforeIndex].Add(afterIndex);
     shouldSortFamilies = true;
 }