DOTween开发文档中文版

DOTween相比iTween,语法更优雅,效率更高,笔者将尽可能翻译完DOTween的官方文档。

Nomenclature(命名规则)

Tweener:A tween that takes control of a value and animates it.api

补间动画:管理一个值并在这个值上建立动画。app

Sequence:A special tween that, instead of taking control of a value, takes control of other tweens and animates them as a group.ide

序列:序列是特殊的补间动画,它并无论理值,而是管理其余的补间而且以一个群组的方式建立补间集合的动画。
函数

Tween:A generic word that indicates both a Tweener and a Sequence.oop

补间:一个笼统的单词,既能够表明补间动画也能够表明序列动画

Nested tween:A tween contained inside a Sequence.this

嵌套补间:包含在序列中的补间url


Prefixes(前缀)

Prefixes are important to use the most out of IntelliSense, so try to remember these:spa

前缀几乎是咱们在感官上识别如何准确使用的最重要的组成,因此请务必记住这些:翻译

DO
Prefix for all tween shortcuts (operations that can be started directly from a known object, like a transform or a material). Also the prefix of the main DOTween class.
DO是全部补间快捷方式(对于快捷方式的含义咱们在下一部分会提到)的前缀 ,DO做为前缀的补间能够对一个已知的对象进行操做,好比transform对象或material对象。也是主要类 DOTween 前缀。咱们看如下的示例:
1 ransform.DOMoveX(100, 1);
2 transform.DORestart();
3 DOTween.Play();
Set
Prefix for all settings that can be chained to a tween (except for From, since it’s applied as a setting but is not really a setting).
对于一个补间咱们能够还进行一些设置,这些设置咱们用Set做为前缀(From却没有使用Set做前缀由于它以设置的方式使用真正设置) 
1 myTween.SetLoops(4, LoopType.Yoyo).SetSpeedBased();

 

On
Prefix for all callbacks that can be chained to a tween.
对于一个补间,咱们还能够设置回调函数,这些回调函数用On做为前缀。
1 myTween.OnStart(myStartFunction).OnComplete(myCompleteFunction);
相关文章
相关标签/搜索