| | |
| | | switch (wrapMode) |
| | | { |
| | | case WrapMode.Once: |
| | | if (accumulatedTime > duration) |
| | | { |
| | | OnOnceEnd(); |
| | | doTween = false; |
| | | } |
| | | break; |
| | | case WrapMode.PingPongOnce: |
| | | if (accumulatedTime > duration*2) |
| | | if (accumulatedTime > duration) |
| | | { |
| | | OnOnceEnd(); |
| | | doTween = false; |
| | |
| | | t = Mathf.Repeat((accumulatedTime / duration) * curveLength, 1); |
| | | break; |
| | | case WrapMode.PingPong: |
| | | case WrapMode.PingPongOnce: |
| | | t = Mathf.PingPong((accumulatedTime / duration) * curveLength, 1); |
| | | break; |
| | | case WrapMode.PingPongOnce: |
| | | t = Mathf.PingPong((accumulatedTime / (duration/2)) * curveLength, 1); |
| | | break; |
| | | } |
| | | |
| | | var value = curve.Evaluate(reversal ? curveLength - t : t); |