Exemple #1
0
        /// <summary>
        /// 创建alpha渐变
        /// </summary>
        /// <param name="d">时间</param>
        /// <param name="a">0-1</param>
        /// <returns></returns>
        protected static ColorBy Create(float d, float a)
        {
            var ret = new ColorBy();

            if (ret.InitWithDuration(d))
            {
                ret.m_delta_a = a;
                return(ret);
            }
            return(null);
        }
Exemple #2
0
        /// <summary>
        /// 创建RGB渐变
        /// </summary>
        /// <param name="d">时间</param>
        /// <param name="r">0-1</param>
        /// <param name="g">0-1</param>
        /// <param name="b">0-1</param>
        protected static ColorBy Create(float d, float r, float g, float b)
        {
            var ret = new ColorBy();

            if (ret.InitWithDuration(d))
            {
                ret.m_delta_r = r;
                ret.m_delta_g = g;
                ret.m_delta_b = b;
                return(ret);
            }
            return(null);
        }
Exemple #3
0
        protected static ColorBy Create(float d, Color deltaColor)
        {
            var ret = new ColorBy();

            if (ret.InitWithDuration(d))
            {
                ret.m_delta_r = deltaColor.r;
                ret.m_delta_g = deltaColor.g;
                ret.m_delta_b = deltaColor.b;
                ret.m_delta_a = deltaColor.a;
                return(ret);
            }
            return(null);
        }