public static int GetFrameLengthFromAnimationGroup( this Sequence sequence, int animationGroupIndex) => sequence.AggregateAnimationGroup <int>(animationGroupIndex, (x, i) => Math.Max(x, sequence.GetFrameLengthFromAnimation(i)));
public static Rectangle GetVisibilityRectangleFromAnimationGroup( this Sequence sequence, int animationGroupIndex) => sequence.AggregateAnimationGroup <Rectangle>(animationGroupIndex, (x, i) => x.Union(sequence.GetVisibilityRectangleFromAnimation(i)));