Animatroller.Scenes.Xmas2014.Start C# (CSharp) Метод

Start() публичный Метод

public Start ( ) : void
Результат void
        public override void Start()
        {
            //            soundOut.Initialize(waveSource);

            candyCane
                .WhenExecuted
                .SetUp(() => pixelsRoofEdge.TurnOff())
                .Execute(instance =>
                {
                    const int spacing = 4;

                    while (true)
                    {
                        for (int i = 0; i < spacing; i++)
                        {
                            pixelsRoofEdge.Inject((i % spacing) == 0 ? Color.Red : Color.White, 0.5);

                            instance.WaitFor(S(0.30), true);
                        }
                    }
                })
                .TearDown(() =>
                    {
                        pixelsRoofEdge.TurnOff();
                    });

            // Test Button
            buttonTest.Output.Subscribe(x =>
            {
                if (!x)
                    return;

                for (int sab = 00; sab < 32; sab++)
                {
                    saberPixels.Inject(Color.Red, 0.5);
                    Exec.Sleep(S(0.01));
                }
                Exec.Sleep(S(1));

                saberPixels.SetAll(Color.Black, 0);
                //                stateMachine.SetState(States.Music2);
            });

            buttonSnowMachine.Output.Subscribe(x =>
                {
                    lightSnow.SetColor(Color.White, x ? 1.0 : 0.0);

                    snowMachine.Value = x;

                    midiBcfOutput.Send(0, 92, (byte)(x ? 127 : 0));
                });

            snowMachine.Output.Subscribe(x =>
            {
                // TODO: Turn off after X period of time
            });

            buttonTest2.Output.Subscribe(x =>
                {
                    if (!x)
                        return;

                    stateMachine.SetState(States.Music1);
                    //                    Exec.Execute(fatherSeq);
                    //                    starwarsPixels.SetAll(Color.Red, 1.0);

                    /*
                    var ctrl = movingHead.TakeControl();
                    Exec.MasterEffect.Fade(movingHead.InputPan, 0, 540, 3000)
                        .ContinueWith(_ => ctrl.Dispose());*/
                });
        }