public override void Draw() { for (int x = 0; x < Program.TableWidth; x++) { for (int y = 0; y < Program.TableHeight; y++) { amounts[x, y] = Mathf.Clamp01(amounts[x, y] - 0.01f); if (touchManager.GetInputAt(new Position(x, y))) { amounts[x, y] = 1f; } SetPixel(x, y, PixelColor.LerpRGB(PixelColor.BLACK, PixelColor.WHITE, amounts[x, y])); } } }
public override void Draw() { ClearPixels(); if (auto) { hue += 0.0005f; if (hue > 1f) { hue -= 1f; } } float delta = 0.01f; PixelColor color = PixelColor.LerpRGB(lastColor, PixelColor.FromHSL(hue, 1f, 0.5f), delta); SetPixels(PixelColor.GetSingleColorMap(Program.TableWidth, Program.TableHeight, color)); lastColor = color; }
public override void Draw() { if (raising) { amount += speed; } else { amount -= speed; } SetPixels(PixelColor.GetSingleColorMap(Program.TableWidth, Program.TableHeight, PixelColor.LerpRGB(PixelColor.BLACK, color, Mathf.Clamp01(amount)))); if (raising) { if (amount >= 1.5f) { raising = false; } } else if (amount <= -0.5f) { ClearPixels(); Reset(); } }