Exemplo n.º 1
0
    public static ITween TweenWidth(this LineRenderer lineRenderer, float to, float duration)
    {
        ITween startTween = TweenStartWidth(lineRenderer, to, duration);
        ITween endTween = TweenEndWidth(lineRenderer, to, duration);

        GroupTween groupTween = new GroupTween();
        groupTween.Add(startTween);
        groupTween.Add(endTween);

        return groupTween;
    }
Exemplo n.º 2
0
    public static ITween TweenColor(this LineRenderer lineRenderer, Color to, float duration)
    {
        ITween startTween = TweenStartColor(lineRenderer, to, duration);
        ITween endTween = TweenEndColor(lineRenderer, to, duration);

        GroupTween groupTween = new GroupTween();
        groupTween.Add(startTween);
        groupTween.Add(endTween);

        return groupTween;
    }
    public static ITween TweenPreferedSize(this LayoutElement layoutElement, Vector2 to, float duration)
    {
        ITween widthTween  = TweenPreferedWidth(layoutElement, to.x, duration);
        ITween heightTween = TweenPreferedHeight(layoutElement, to.y, duration);

        GroupTween groupTween = new GroupTween();

        groupTween.Add(widthTween);
        groupTween.Add(heightTween);

        return(groupTween);
    }
    public static ITween TweenColorNoAlpha(this TrailRenderer trailRenderer, Color to, float duration)
    {
        ITween startTween = TweenStartColorNoAlpha(trailRenderer, to, duration);
        ITween endTween   = TweenEndColorNoAlpha(trailRenderer, to, duration);

        GroupTween groupTween = new GroupTween();

        groupTween.Add(startTween);
        groupTween.Add(endTween);

        return(groupTween);
    }
Exemplo n.º 5
0
        public void Join(Tween tween)
        {
            if (creatingGroupTween)
            {
                GroupTween groupTween = (GroupTween)tweens[tweens.Count - 1];

                groupTween.Add(tween);

                return;
            }

            creatingGroupTween = true;

            GroupTween newGroupTween = new GroupTween();

            newGroupTween.Add(tween);

            tweens.Add(newGroupTween);
        }