public static Transform SetTransfrom(this Transform t, TransfromStruct ts) { t.transform.localPosition = ts.pos; t.transform.localRotation = ts.rotation; t.transform.localScale = ts.scale; return(t.transform); }
public static void DoTransfrom(this Transform tt, float time, TransfromStruct tarTransfromInfor, System.Action action) { tt.DOLocalMove(tarTransfromInfor.pos, time).onComplete = () => { action?.Invoke(); action = null; };; tt.DORotateQuaternion(tarTransfromInfor.rotation, time); tt.DOScale(tarTransfromInfor.scale, time); }