/** Pause all selectors and blocks from all targets with a minimum priority. * You should only call this with kCCPriorityNonSystemMin or higher. * @since v2.0.0 */ public HashSet <System.Object> pauseAllTargetsWithMinPriority(int minPriority) { HashSet <System.Object> idsWithSelectors = new HashSet <System.Object>(); // Custom Selectors { var enumerator = hashForTimers.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <int, tHashTimerEntry> kv = enumerator.Current; tHashTimerEntry element = kv.Value; element.paused = true; idsWithSelectors.Add(element.target); } } // Updates selectors if (minPriority < 0) { for (utNode <tListEntry> tmp = updatesNeg.head; tmp != null; tmp = tmp.next) { utNode <tListEntry> entry = tmp; if (entry.obj.priority >= minPriority) { entry.obj.paused = true; idsWithSelectors.Add(entry.obj.target); } } } if (minPriority <= 0) { for (utNode <tListEntry> tmp = updates0.head; tmp != null; tmp = tmp.next) { utNode <tListEntry> entry = tmp; entry.obj.paused = true; idsWithSelectors.Add(entry.obj.target); } } { for (utNode <tListEntry> tmp = updatesPos.head; tmp != null; tmp = tmp.next) { utNode <tListEntry> entry = tmp; if (entry.obj.priority >= minPriority) { entry.obj.paused = true; idsWithSelectors.Add(entry.obj.target); } } } return(idsWithSelectors); }
public void removeSpriteFramesFromTexture(Texture2D texture) { utList <string> keysToRemove = new utList <string> (); var enumerator = _spriteFrames.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <string, CCSpriteFrame> kv = enumerator.Current; string spriteFrameKey = kv.Key; CCSpriteFrame frame = kv.Value; if (frame.texture == texture) { keysToRemove.DL_APPEND(spriteFrameKey); } } for (var ent = keysToRemove.head; ent != null; ent = ent.next) { _spriteFrames.Remove(ent.obj); } }