public void SetCurrent2(Spell currentSpell, CardData currentCard) { UnclampedHSV to = new UnclampedHSV() { hue = (currentSpell.hue % 360f) / 360f, val = currentSpell.lightness / 100f }; if (currentCard.type == CARD_TYPE.HUE) { if (currentCard.value == 360) { to.hue += 1f; } else { to.hue += currentCard.value / 360f; } } else { to.val += currentCard.value / 100f; } UnclampedHSV from = UnclampedHSV.fromColor(background.color); this.animatingColors = true; AnimateColorInHSLSpace(background, from, to, 0.5f); }
public void SetCurrent(float hue, float lightness) { UnclampedHSV to = new UnclampedHSV() { hue = hue / 360f, val = lightness / 100f }; UnclampedHSV from = UnclampedHSV.fromColor(background.color); this.animatingColors = true; AnimateColorInHSLSpace(background, from, to, 0.5f); }