Ejemplo n.º 1
0
    public static TweenRotation AddTween(GameObject target, Vector3 from, Vector3 to, float duration, Keyframe[] keys)
    {
        TweenRotation tweener = target.AddComponent <TweenRotation>();

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

        tweener.Initialise();

        return(tweener);
    }