public static void DebugPrintEntriesAll(AnimationType type = AnimationType.All) { foreach (var animation in Animations) { if (type.HasFlag(animation.type)) { animation.DebugPrintEntries(); } } }
// _animations may be mutated when some animation stops public static void StopAll(AnimationType type = AnimationType.All) { while (true) { var animation = Animations.FirstOrDefault(_animation => type.HasFlag(_animation.type) && !_animation.isStopped); if (animation == null) { break; } animation.Stop(); } }
public static float GetTotalTimeRemaining(AnimationType type = AnimationType.All) { return((from animation in Animations where type.HasFlag(animation.type) select animation.totalTimeRemaining).Max()); }
public static bool IsPlayingAny(AnimationType type = AnimationType.All) { return(Animations.Any(animation => type.HasFlag(animation.type) && animation.isPlaying)); }