DOTween- rookie beginner (four) link settings

1.SetAs (The Tween complement \ TweenParams tweenParams)
parameters tween (id, slow moving, cyclic, delay, TimeScale, callback, etc.) to the given parameter (not copy specific SetOptions provided: manually every application ) parameters. Given TweenParams object.

2.SetAutoKill (bool autoKillOnCompletion = true)
if autoKillOnCompletion it is set to TRUE, the result will be destroyed immediately after completion, otherwise it will remain in memory, you will be able to reuse it.
Note: By default, the tween will self-destruct (therefore, only if you intend to FALSE need to use this method as a parameter) at the time of completion, but you can change the default behavior in DOTween "Utility" panel.


        transform.DOMove(new Vector3(0, 3f, 0), 1).SetLoops(2,LoopType.Yoyo).SetAutoKill (true);

3.SetLoops (int loop, LoopType loopType = LoopType.Restart)
Setting cycle option (Restart, Yoyo, Incremental tweens).
Set to -1 loops will cause an infinite loop.
LoopType.Restart: At the end of the cycle, we will start from scratch.
LoopType.Yoyo: At the end of the cycle, it will be played back until another cycle is completed, then play forward again, and then play back again, and so on.
LoopType.Incremental: the end of each cycle, and then its value increases in each cycle.

   transform.DOMove(new Vector3(0, 3f, 0), 1).SetLoops(2,LoopType.Yoyo);

4.From (bool isRelative = false)
so that immediately after reaching the target, and then return to the original position.

transform.DOMove(new Vector3(0, 3f, 0), 1).From();

5.SetDelay (floating delay)
disposed delayed start. Comparable to the original AppendInterval

transform.DOMove(new Vector3(0, 3f, 0), 1).From().SetDelay (3);

6.SetSpeedBased (bool isSpeedBased = true)
original time parameter to the speed parameter.

 transform.DOMove(new Vector3(0, 3f, 0), 1).From().SetDelay (3).SetSpeedBased ();

7.SetRelative (bool isRelative = true)
as increments, to increase its original position variables

 transform.DOMove(new Vector3(0, 3f, 0), 1).SetRelative();

If the original position of the object (0,3,0), the result of the position of the object (0,6,0);

8.SetRecyclable (bool recoverable)
If true, the end of the recovery destruction and vice versa.

 transform.DOMove(new Vector3(0, 3f, 0), 1).SetRelative().SetRecyclable();

9.SetId (object ID)
set id. It can be integers, strings, objects, or anything else. Then it is used as a filter DOTween of static methods. Recommended int

10.SetUpdate (the UpdateType the updateType, BOOL = isIndependentUpdate to false)
UpdateType.Normal: Call updated each frame update.
UpdateType.Late: updated every frame during LateUpdate call.
UpdateType.Fixed: Use FixedUpdate call to update.
UpdateType.Manual: updated manually DOTween.ManualUpdate calls.
isIndependentUpdate If TRUE, the tween will ignore the Unity of Time.timeScale.
Note: IndependentUpdate can also be used, UpdateType.Fixed but in this case is not recommended (because it would not run at 0 FixedUpdate on timeScale).

Published 10 original articles · won praise 0 · Views 131

Guess you like

Origin blog.csdn.net/qq_39121279/article/details/104819152