Пример #1
0
        void Update()
        {
            HSBColor hsbColor = new HSBColor(color);

            hsbColor.hue += deltaTime * m_cycleSpeed;
            hsbColor.hue %= 1.0f;
            color         = hsbColor.ToColor();
        }
Пример #2
0
        void Update()
        {
            color.hue += 0.1f * Time.deltaTime;
            color.hue %= 1.0f;

            ParticleSystem particle   = GetComponent <ParticleSystem>();
            var            main       = particle.main;
            var            startColor = main.startColor;

            startColor.color = color.ToColor();
            main.startColor  = startColor;
//			particle.main = main;
        }
Пример #3
0
        void Start()
        {
            HSBColor hsbColor = new HSBColor(color);

            if (m_randomHue)
            {
                hsbColor.hue = Random.Range(m_minHue, m_maxHue);
            }
            if (m_randomSaturation)
            {
                hsbColor.saturation = Random.Range(m_minSaturation, m_maxSaturation);
            }
            if (m_randomBrightness)
            {
                hsbColor.brightness = Random.Range(m_minBrightness, m_maxBrightness);
            }
            if (m_randomAlpha)
            {
                hsbColor.alpha = Random.Range(m_minAlpha, m_maxAlpha);
            }
            color = hsbColor.ToColor();
        }