Example #1
0
    public static void SetButtonColor(Image buttonTo, Color colorTo)
    {
        if (buttonTo == null)
        {
            return;
        }

        TweenUtil.ColorToObject(buttonTo.gameObject, colorTo, .5f, 0f);

        //UITweenerUtil.ColorTo(buttonTo.gameObject,
        //    UITweener.Method.Linear, UITweener.Style.Once, .5f, 0f, colorTo);
    }
Example #2
0
    public static void SetLabelColor(Text labelTo, Color colorTo)
    {
        if (labelTo == null)
        {
            return;
        }

        TweenUtil.ColorToObject(labelTo.gameObject, colorTo, .5f, 0f);

        //UITweenerUtil.ColorTo(labelTo.gameObject,
        //    UITweener.Method.Linear, UITweener.Style.Once, .5f, 0f, colorTo);
    }
Example #3
0
    public static void SetSpriteColor(GameObject go, Color colorTo)
    {
        if (go == null)
        {
            return;
        }

        if (go != null)
        {
            TweenUtil.ColorToObject(go, colorTo, .5f, 0f);

            //UITweenerUtil.ColorTo(go,
            //     UITweener.Method.Linear, UITweener.Style.Once, .5f, 0f, colorTo);
        }
    }
Example #4
0
    public void UpdateColor()
    {
        if (lastColorHighlight != colorHighlight)
        {
            lastColorHighlight = colorHighlight;

            if (containerHighlighted != null)
            {
                TweenUtil.ColorToObject(containerHighlighted, colorHighlight, 1f, 0f);

                //UITweenerUtil.ColorToHandler<UISprite>(
                //    containerHighlighted,
                //    colorHighlight,
                //    1f, 0f);
            }
        }
    }
Example #5
0
    public static void AnimateColor(GameObject go, Color colorTo)
    {
        TweenUtil.ColorToObject(go, colorTo, 1f, .5f);

        //UITweenerUtil.ColorTo(go, UITweener.Method.Linear, UITweener.Style.Once, 1f, .5f, colorTo);
    }