public void UpdateColors(LedCollection ledCollection) { _distance += 1; foreach (Led led in ledCollection.Items) { int distance = _distance % (6 * Slowness); _rainbow.HandleRainbow(led, distance, Slowness); _sparklers.HandleSparkle(led); } }
public void UpdateColors(LedCollection ledCollection) { _rotation += 1; foreach (Led led in ledCollection.Items) { int angle = (led.Angle + _rotation) % 360; if (led.Distance != 0) { _rainbow.HandleRainbow(led, angle, 60); } } }