コード例 #1
0
    /// <summary>
    /// Returns a Tween instance that is configured to animate a Transform along a spline path
    /// </summary>
    /// <param name="component">The component whose position will be animated along the path</param>
    /// <param name="path">The Spline path to follow</param>
    /// <param name="orientToPath">If set to TRUE, the object will be oriented to match the path's direction</param>
    public static Tween <float> TweenPath(this Component component, IPathIterator path, bool orientToPath)
    {
        if (component == null)
        {
            throw new ArgumentNullException("component");
        }

        return(TweenTransformExtensions.TweenPath(component.transform, path));
    }
コード例 #2
0
 public static Tween <Vector3> Position(Transform transform, bool useLocalPosition)
 {
     return(TweenTransformExtensions.TweenPosition(transform, useLocalPosition));
 }
コード例 #3
0
 /// <summary>
 /// Returns a Tween instance that is configured to animate a Transform.position property
 /// </summary>
 /// <param name="component">The component to be animated</param>
 /// <param name="useLocalPosition">If set to TRUE, the Transform.localPosition property will be used instead of Transform.position</param>
 public static Tween <Vector3> TweenPosition(this Component component, bool useLocalPosition)
 {
     return(TweenTransformExtensions.TweenPosition(component.transform, useLocalPosition));
 }
コード例 #4
0
 /// <summary>
 /// Returns a Tween instance that is configured to animate a Transform.position property
 /// </summary>
 /// <param name="component">The component to be animated</param>
 public static Tween <Vector3> TweenPosition(this Component component)
 {
     return(TweenTransformExtensions.TweenPosition(component.transform, false));
 }
コード例 #5
0
 /// <summary>
 /// Returns a Tween instance that is configured to animate a Transform.eulerAngles property
 /// </summary>
 /// <param name="component">The component to be animated</param>
 /// <param name="useShortestPath">If set to TRUE, the rotation will follow the shortest path.</param>
 /// <param name="useLocalRotation">If set to TRUE, then Transform.localEulerAngles will be animated instead of Transform.eulerAngles</param>
 public static Tween <Vector3> TweenRotation(this Component component, bool useShortestPath, bool useLocalRotation)
 {
     return(TweenTransformExtensions.TweenRotation(component.transform, useShortestPath, useLocalRotation));
 }
コード例 #6
0
 /// <summary>
 /// Returns a Tween instance that is configured to animate a Transform.localScale property
 /// </summary>
 /// <param name="component">The component to be animated</param>
 public static Tween <Vector3> TweenScale(this Component component)
 {
     return(TweenTransformExtensions.TweenScale(component.transform));
 }
コード例 #7
0
 /// <summary>
 /// Returns a Tween instance that is configured to animate the Transform.localScale property
 /// from the current scale to the desired end scale.
 /// </summary>
 /// <param name="component">The component to be animated</param>
 /// <param name="endScale">The desired end scale</param>
 public static Tween <Vector3> TweenScaleTo(this Component component, Vector3 endScale)
 {
     return(TweenTransformExtensions.TweenScale(component.transform).SetEndValue(endScale));
 }
コード例 #8
0
 public static Tween <Vector3> Scale(Transform transform)
 {
     return(TweenTransformExtensions.TweenScale(transform));
 }
コード例 #9
0
 public static TweenShake Shake(Transform transform, bool localPosition)
 {
     return(TweenTransformExtensions.ShakePosition(transform, localPosition));
 }
コード例 #10
0
 public static Tween <Vector3> Rotation(Transform transform, bool useShortestPath, bool useLocalRotation)
 {
     return(TweenTransformExtensions.TweenRotation(transform, useShortestPath, useLocalRotation));
 }
コード例 #11
0
 public static Tween <Vector3> Rotation(Transform transform)
 {
     return(TweenTransformExtensions.TweenRotation(transform));
 }
コード例 #12
0
 public static Tween <Vector3> MoveFrom(Transform transform, Vector3 startPosition, bool useLocalPosition)
 {
     return(TweenTransformExtensions.TweenMoveFrom(transform, startPosition, useLocalPosition));
 }
コード例 #13
0
 public static Tween <Vector3> MoveFrom(Transform transform, Vector3 startPosition)
 {
     return(TweenTransformExtensions.TweenMoveFrom(transform, startPosition, false));
 }
コード例 #14
0
 public static Tween <Vector3> MoveTo(Transform transform, Vector3 endPosition, bool useLocalPosition)
 {
     return(TweenTransformExtensions.TweenMoveTo(transform, endPosition, useLocalPosition));
 }