Пример #1
0
    public void reset()
    {
        changeTimer = 0;
        int      option = getOption();
        ColorSet clSet  = colors[option];

        mat.SetColor("_Color", clSet.getColor(1));
        mat.SetColor("_EmissionColor", clSet.getColor(2));
    }
Пример #2
0
    private void setColor(ColorSet clSet)
    {
        _clFrom  = mat.GetColor("_Color");
        _emmFrom = mat.GetColor("_EmissionColor");

        _clTo  = clSet.getColor(1);
        _emmTo = clSet.getColor(2);

        t = 0;
    }
Пример #3
0
        public static Color GetNextDifferentColor()
        {
            //currentSequence += differentStep;

            //if(currentSequence <= max)
            //{
            //    return colorSet.getColor(currentSequence);
            //}
            //else
            //{
            //    currentSequence -= max;
            //    return colorSet.getColor(currentSequence);
            //}

            currentSequence = (currentSequence + differentStep) % max;
            return(colorSet.getColor(currentSequence));
        }
Пример #4
0
 /// <summary>
 /// 设置Label的字体颜色.
 /// </summary>
 void SetLabelShowColor()
 {
     if (showColor == TxtColor.Default)
     {
         return;
     }
     if (label != null)
     {
         label.color = ColorSet.getColor(showColor);
     }
 }
Пример #5
0
 public SolidColorBrushSet()
 {
     colorMap = new Rainbow();
     max      = colorMap.getMax();
     halfMax  = colorMap.getHalfMax();
     setMaxValue(max);
     brushMap = new SolidBrush[max];
     for (int i = 0; i < max; i++)
     {
         brushMap[i] = new SolidBrush(colorMap.getColor(i + 1));
     }
 }
Пример #6
0
 public ColorPenSet()
 {
     colorMap = new Rainbow();
     max      = colorMap.getMax();
     halfMax  = colorMap.getHalfMax();
     setMaxValue(max);
     pens = new Pen[max];
     for (int i = 0; i < max; i++)
     {
         pens[i] = new Pen(colorMap.getColor(i + 1));
     }
 }