dotween有一种写法
transform.DOMove
给Transform类扩展了方法
具体实现为
using System; using UnityEngine; public static Tweener DOMove (this Transform target, Vector3 endValue, float duration, bool snapping = false) { return DOTween.To (() => target.get_position (), delegate (Vector3 x) { target.set_position (x); }, endValue, duration).SetOptions (snapping).SetTarget (target); }
静态类,this关键字