Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }