예제 #1
0
        public override IEnumerable <GloCommand> ToGloCommands(GloSequenceContext context)
        {
            yield return(new GloColorCommand(_startColor));

            yield return(new GloRampCommand(_endColor, context.Advance(Duration).Ticks));

            yield return(new GloColorCommand(GloColor.Black));
        }
예제 #2
0
        public override IEnumerable <GloCommand> ToGloCommands(GloSequenceContext context)
        {
            yield return(new GloColorCommand(_color));

            yield return(context.Advance(Duration).AsCommand());

            yield return(new GloColorCommand(GloColor.Black));
        }
        public override IEnumerable <GloCommand> ToGloCommands(GloSequenceContext context)
        {
            // TO_DO handle repetitions of more than 255
            var loop = new GloLoopCommand(_repetitions);

            GloSequenceContext subContext = new GloSequenceContext(context.Track, loop);

            subContext.Append(Children.Where(child => child.Tracks.Contains(context.Track)));

            if (Duration > subContext.CurrentTime)
            {
                loop.Commands.Add(subContext.Advance(Duration - subContext.CurrentTime).AsCommand());
            }

            subContext.Advance(subContext.CurrentTime * (_repetitions - 1)); // fix internal time
            subContext.Postprocess();

            // advance main context
            context.Advance(subContext.CurrentTime);

            // TO_DO split loop when fractions are involved
            yield return(loop);
        }
 public override IEnumerable <GloCommand> ToGloCommands(GloSequenceContext context)
 {
     throw new NotImplementedException("implemented by LoopBlock");
 }
예제 #5
0
 public abstract IEnumerable <GloCommand> ToGloCommands(GloSequenceContext context);