Пример #1
0
        public void UpdateColors(LedCollection ledCollection)
        {
            _distance -= 1;
            if (_distance < 0)
            {
                _distance = Int32.MaxValue;
            }

            foreach (Led led in ledCollection.Items)
            {
                int distance = (led.Distance + _distance) % 600;

                _rainbow.HandleRainbow(led, distance, 100);
            }
        }
Пример #2
0
        public SnowflakeLeds()
        {
            _ledCollection = new LedCollection();

            CreateArm(0);
            CreateArm(60);
            CreateArm(120);

            Led led = new Led(0, 0);

            led.Color = new RgbColor(255, 255, 255);
            _ledCollection.Add(led);

            CreateArm(180);
            CreateArm(240);
            CreateArm(300);
        }