示例#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);
 }