1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-21 01:36:05 +08:00

Added Tween.PathGetPoint method

This commit is contained in:
Daniele Giardini 2015-05-05 13:07:24 +02:00
parent a0701f26a2
commit e4b70b4740
49 changed files with 131 additions and 5 deletions

View File

@ -779,6 +779,15 @@
<member name="M:DG.Tweening.TweenExtensions.IsPlaying(DG.Tweening.Tween)">
<summary>Returns TRUE if this tween is playing</summary>
</member>
<member name="M:DG.Tweening.TweenExtensions.PathGetPoint(DG.Tweening.Tween,System.Single)">
<summary>
Returns the a point on a path (returns <code>Vector3.zero</code> if this is not a path tween, if the tween is invalid, or if the path is not yet initialized),
based on the given path percentage (0 to 1).
A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
You can force a path to be initialized by calling <code>myTween.ForceInit()</code>.
</summary>
<param name="pathPercentage">Percentage of the path on which to get the point (0 to 1)</param>
</member>
<member name="M:DG.Tweening.TweenExtensions.PathLength(DG.Tweening.Tween)">
<summary>
Returns the length of a path (returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized).

View File

@ -779,6 +779,15 @@
<member name="M:DG.Tweening.TweenExtensions.IsPlaying(DG.Tweening.Tween)">
<summary>Returns TRUE if this tween is playing</summary>
</member>
<member name="M:DG.Tweening.TweenExtensions.PathGetPoint(DG.Tweening.Tween,System.Single)">
<summary>
Returns the a point on a path (returns <code>Vector3.zero</code> if this is not a path tween, if the tween is invalid, or if the path is not yet initialized),
based on the given path percentage (0 to 1).
A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
You can force a path to be initialized by calling <code>myTween.ForceInit()</code>.
</summary>
<param name="pathPercentage">Percentage of the path on which to get the point (0 to 1)</param>
</member>
<member name="M:DG.Tweening.TweenExtensions.PathLength(DG.Tweening.Tween)">
<summary>
Returns the length of a path (returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized).

View File

@ -779,6 +779,15 @@
<member name="M:DG.Tweening.TweenExtensions.IsPlaying(DG.Tweening.Tween)">
<summary>Returns TRUE if this tween is playing</summary>
</member>
<member name="M:DG.Tweening.TweenExtensions.PathGetPoint(DG.Tweening.Tween,System.Single)">
<summary>
Returns the a point on a path (returns <code>Vector3.zero</code> if this is not a path tween, if the tween is invalid, or if the path is not yet initialized),
based on the given path percentage (0 to 1).
A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
You can force a path to be initialized by calling <code>myTween.ForceInit()</code>.
</summary>
<param name="pathPercentage">Percentage of the path on which to get the point (0 to 1)</param>
</member>
<member name="M:DG.Tweening.TweenExtensions.PathLength(DG.Tweening.Tween)">
<summary>
Returns the length of a path (returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized).

View File

@ -19,6 +19,11 @@
Default style palette
</summary>
</member>
<member name="F:DG.DemiEditor.DeGUI.isProSkin">
<summary>
TRUE if we're using the PRO skin
</summary>
</member>
<member name="M:DG.DemiEditor.DeGUI.BeginGUI(DG.DemiLib.DeColorPalette,DG.DemiEditor.DeStylePalette)">
<summary>
Call this at the beginning of GUI methods

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 B

View File

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: dd8309cb7cac88445bd6d49a894d1622
timeCreated: 1430440731
guid: c1e04f5651b88934e8f92a1e46ca5155
timeCreated: 1430823723
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}

View File

@ -0,0 +1,55 @@
fileFormatVersion: 2
guid: 499b4afbc3a217548bd8ca3f202172e5
timeCreated: 1430823723
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 0
linearTexture: 1
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 16
textureSettings:
filterMode: 0
aniso: 1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 2
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -4,10 +4,10 @@ using DG.Tweening;
public class TempPro : MonoBehaviour
{
public float timeScale = 0;
public DOTweenPath tweenP;
void Start()
{
Time.timeScale = timeScale;
Debug.Log(tweenP.GetTween().PathGetPoint(0.5f));
}
}

View File

@ -32,7 +32,7 @@ namespace DG.Tweening
public class DOTween
{
/// <summary>DOTween's version</summary>
public static readonly string Version = "1.0.655";
public static readonly string Version = "1.0.660";
///////////////////////////////////////////////
// Options ////////////////////////////////////

View File

@ -479,6 +479,36 @@ namespace DG.Tweening
#region Path Tweens
/// <summary>
/// Returns the a point on a path (returns <code>Vector3.zero</code> if this is not a path tween, if the tween is invalid, or if the path is not yet initialized),
/// based on the given path percentage (0 to 1).
/// A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
/// You can force a path to be initialized by calling <code>myTween.ForceInit()</code>.
/// </summary>
/// <param name="pathPercentage">Percentage of the path on which to get the point (0 to 1)</param>
public static Vector3 PathGetPoint(this Tween t, float pathPercentage)
{
if (pathPercentage > 1) pathPercentage = 1;
else if (pathPercentage < 0) pathPercentage = 0;
if (t == null) {
if (Debugger.logPriority > 1) Debugger.LogNullTween(t); return Vector3.zero;
} else if (!t.active) {
if (Debugger.logPriority > 1) Debugger.LogInvalidTween(t); return Vector3.zero;
} else if (t.isSequenced) {
if (Debugger.logPriority > 1) Debugger.LogNestedTween(t); return Vector3.zero;
}
TweenerCore<Vector3, Path, PathOptions> pathTween = t as TweenerCore<Vector3, Path, PathOptions>;
if (pathTween == null) {
if (Debugger.logPriority > 1) Debugger.LogNonPathTween(t); return Vector3.zero;
} else if (!pathTween.endValue.isFinalized) {
if (Debugger.logPriority > 1) Debugger.LogWarning("The path is not finalized yet"); return Vector3.zero;
}
return pathTween.endValue.GetPoint(pathPercentage, true);
}
/// <summary>
/// Returns the length of a path (returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized).
/// A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).

View File

@ -779,6 +779,15 @@
<member name="M:DG.Tweening.TweenExtensions.IsPlaying(DG.Tweening.Tween)">
<summary>Returns TRUE if this tween is playing</summary>
</member>
<member name="M:DG.Tweening.TweenExtensions.PathGetPoint(DG.Tweening.Tween,System.Single)">
<summary>
Returns the a point on a path (returns <code>Vector3.zero</code> if this is not a path tween, if the tween is invalid, or if the path is not yet initialized),
based on the given path percentage (0 to 1).
A path is initialized after its tween starts, or immediately if the tween was created with the Path Editor (DOTween Pro feature).
You can force a path to be initialized by calling <code>myTween.ForceInit()</code>.
</summary>
<param name="pathPercentage">Percentage of the path on which to get the point (0 to 1)</param>
</member>
<member name="M:DG.Tweening.TweenExtensions.PathLength(DG.Tweening.Tween)">
<summary>
Returns the length of a path (returns -1 if this is not a path tween, if the tween is invalid, or if the path is not yet initialized).

Binary file not shown.

Binary file not shown.

Binary file not shown.