private void ValueChangedInternal(T value) { UnrealBinaryHeapEx <T> collection = GetCollection(value.Owner.Group); collection.HeapRemove(value); collection.HeapPush(value); }
private void RemoveInternal(T value) { UnrealBinaryHeapEx <T> collection = GetCollection(value.Owner.Group); collection.HeapRemove(value); value.comparableCollection = null; }
private void UpdateValues(bool setStartValue) { if (!Running) { return; } if (setStartValue) { switch (Type) { case InvokerType.Delay: BeginValue = startingValue = (ulong)WorldTimeHelper.GetTimeChecked(OwnerWorld).Ticks; break; case InvokerType.Ticks: BeginValue = startingValue = EngineLoop.WorldTickCounter; break; case InvokerType.Frames: BeginValue = startingValue = EngineLoop.WorldFrameNumber; break; } } InvokerCollectionGroup newCollectionGroup = GetInvokerGroup(Group); UnrealBinaryHeapEx <Invoker> newCollection = newCollectionGroup == null ? null : newCollectionGroup.GetCollection(Type); if (collectionGroup != null && collection != null) { if (collectionGroup.Group != Group || newCollection != collection) { collection.HeapRemove(this); collection = null; collectionGroup = null; } } if (newCollection != null) { collectionGroup = newCollectionGroup; collection = newCollection; newCollection.HeapPush(this); } }
private void OnGroupChanged(T instruction, CoroutineGroup oldGroup, CoroutineGroup newGroup) { UnrealBinaryHeapEx <T> oldCollection = GetCollection(oldGroup); UnrealBinaryHeapEx <T> newCollection = GetCollection(newGroup); if (oldCollection != null && newCollection != null && oldCollection != newCollection) { oldCollection.HeapRemove(instruction); newCollection.HeapPush(instruction); } }