public void Tick() { if (direction == Direction.Forward) { StripHelper.RotateRight(memory); } else if (direction == Direction.Backward) { StripHelper.RotateLeft(memory); } }
public void Activate(Color[] pixels) { for (int i = 0; i < pixels.Length; i++) { pixels[(pixels.Length - 1) - i] = this.Color; } for (int j = 0; j < pixels.Length; j += 15) { StripHelper.FillColor(pixels, j + 5, 10, Color.Black); } memory = new Color[pixels.Length]; Array.Copy(pixels, memory, pixels.Length); }
public void FrameUpdate(Color[] pixels) { //Console.WriteLine("test"); if (right) { StripHelper.ShiftRight(pixels); pos += 1; if (pos >= pixels.Length - kitLen) { right = false; } } else { StripHelper.ShiftLeft(pixels); pos -= 1; if (pos < 0) { right = true; } } }
public void Activate(Color[] pixels) { strip = new Color[pixels.Length]; StripHelper.FillColor(strip, 0, strip.Length, Color.Gold); Array.ConstrainedCopy(pixels, 0, strip, 0, pixels.Length); }
public void FrameUpdate(Color[] pixels) { StripHelper.FillColor(pixels, 0, pixels.Length, _color); }