public static int GetFrameLengthFromSequenceProperty( this Layout layout, Layout.SequenceProperty sequenceProperty) { var sequence = layout.SequenceItems[sequenceProperty.SequenceIndex]; var animGroup = sequence.AnimationGroups[sequenceProperty.AnimationGroup]; return(animGroup.GetFrameLength() + sequenceProperty.ShowAtFrame); }
public static Rectangle GetVisibilityRectangleFromSequenceProperty( this Layout layout, Layout.SequenceProperty sequenceProperty) { var sequence = layout.SequenceItems[sequenceProperty.SequenceIndex]; var animGroup = sequence.AnimationGroups[sequenceProperty.AnimationGroup]; return(sequence.GetVisibilityRectangleFromAnimationGroup(animGroup) .Traslate(sequenceProperty.PositionX, sequenceProperty.PositionY)); }