Пример #1
0
        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);
        }
Пример #2
0
        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));
        }