internal void OnOwnerFrozenChanged(BehaviorComponent behavior) { if (behavior.StartQueueNode == null) { behavior.UpdateFamily?.Filter(behavior); behavior.OnOwnerFrozenChanged(); } }
public void Remove(BehaviorComponent b) { if (b.IndexInUpdateFamily >= 0) { behaviors[b.IndexInUpdateFamily] = null; b.IndexInUpdateFamily = -1; } }
public void Add(BehaviorComponent b) { if (b.IndexInUpdateFamily < 0) { b.IndexInUpdateFamily = behaviors.Count; behaviors.Add(b); } }
public void Filter(BehaviorComponent b) { if ((b.Owner.GloballyFrozen && !UpdateFrozen) || b.Suspended) { Remove(b); } else { Add(b); } }
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); } }
internal void Add(BehaviorComponent behavior) { behavior.StartQueueNode = behaviorsToStart.AddLast(behavior); }