Beispiel #1
0
    /// <summary>
    /// Tweens the color to set visibility based on active state
    /// </summary>
    protected virtual void TweenColor(vp_UIContextualControl button, bool active)
    {
        if (button == null)
        {
            return;
        }

        GameObject go = (GameObject)button.Button;

        if (go == null)
        {
            return;
        }

        vp_UITween.FadeTo(go, active ? 1 : 0, FadeDuration, button.Handle);
    }
Beispiel #2
0
    /// <summary>
    /// Tweens the color to set visibility based on active state
    /// </summary>
    protected override void TweenColor(vp_UIContextualControl button, bool active)
    {
        vp_UIContextualControlNGUI nguiButton = (vp_UIContextualControlNGUI)button;

        if (nguiButton == null)
        {
            return;
        }

        UISprite sprite = (UISprite)nguiButton.Sprite;

        if (sprite == null)
        {
            return;
        }

        vp_NGUITween.FadeTo(sprite, active ? 1 : 0, FadeDuration, button.Handle);
    }