DoTween官方文档中文版(二)Prefixes
Prefixes(前缀)
Prefixes are important to use the most out of IntelliSense, so try to remember these:
前缀几乎是我们在感官上识别如何准确使用的最重要的组成,所以请务必记住这些:
- 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.
- 所有补间快捷方式的前缀 (可以直接从一个已知的对象操作,比如transform或material)。这也是主要的 DOTween 类的前缀。我们看以下的示例:
transform.DOMoveX(100, 1);//执行transform的x轴变换
transform.DORestart();//重新开始
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).
- 链接补间的所有设置的前缀(除了From,因为它作为应用设置但不是真正的设置) 。
myTween.SetLoops(4, LoopType.Yoyo).SetSpeedBased();//设置循环模式
- On
- Prefix for all callbacks that can be chained to a tween.
- 所有链接补间的回调前缀。
myTween.OnStart(myStartFunction).OnComplete(myCompleteFunction);
//on开始时(函数).on完成时(函数)