예제 #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));
     }
 }