Пример #1
0
 internal void OnOwnerFrozenChanged(BehaviorComponent behavior)
 {
     if (behavior.StartQueueNode == null)
     {
         behavior.UpdateFamily?.Filter(behavior);
         behavior.OnOwnerFrozenChanged();
     }
 }
Пример #2
0
 public void Remove(BehaviorComponent b)
 {
     if (b.IndexInUpdateFamily >= 0)
     {
         behaviors[b.IndexInUpdateFamily] = null;
         b.IndexInUpdateFamily            = -1;
     }
 }
Пример #3
0
 public void Add(BehaviorComponent b)
 {
     if (b.IndexInUpdateFamily < 0)
     {
         b.IndexInUpdateFamily = behaviors.Count;
         behaviors.Add(b);
     }
 }
Пример #4
0
 public void Filter(BehaviorComponent b)
 {
     if ((b.Owner.GloballyFrozen && !UpdateFrozen) || b.Suspended)
     {
         Remove(b);
     }
     else
     {
         Add(b);
     }
 }
Пример #5
0
 internal void Remove(BehaviorComponent behavior, Node owner)
 {
     if (behavior.StartQueueNode != null)
     {
         behaviorsToStart.Remove(behavior.StartQueueNode);
         behavior.StartQueueNode = null;
     }
     else
     {
         behavior.UpdateFamily?.Remove(behavior);
         behavior.UpdateFamily = null;
         behavior.Stop(owner);
     }
 }
Пример #6
0
 internal void Add(BehaviorComponent behavior)
 {
     behavior.StartQueueNode = behaviorsToStart.AddLast(behavior);
 }