예제 #1
0
    public static TweenColor AddTween(GameObject target, Color from, Color to, float duration, Keyframe[] keys)
    {
        TweenColor tweener = target.AddComponent <TweenColor>();

        tweener.Target     = target;
        tweener.From       = from;
        tweener.To         = to;
        tweener.Duration   = duration;
        tweener.Curve      = new AnimationCurve();
        tweener.Curve.keys = keys;

        tweener.Initialise();

        return(tweener);
    }