示例#1
0
        public void Run(params ActorEntry[] actors)
        {
            var actorCollection = new ActorCollection(_properties, actors);

            for (int i = 0; i < _frameCount; i++)
            {
                RenderFrame(i, actorCollection);
                _output.Write(_frame);
            }
        }
示例#2
0
        private void RenderFrame(int frameNumber, ActorCollection actorCollection)
        {
            var context = new DrawContext
            {
                AnimationProperties = _properties,
                FrameNumber         = frameNumber,
                Time = TimeSpan.FromSeconds((float)frameNumber / _properties.Fps)
            };

            DrawOnCurrentFrame(canvas =>
            {
                context.Canvas = canvas;
                actorCollection.InvokeActors(context);
            });
        }