|
@@ -1,5 +1,4 @@
|
|
|
using DG.Tweening;
|
|
|
-using FairyGUI;
|
|
|
using UnityEngine;
|
|
|
|
|
|
namespace ET.Client
|
|
@@ -10,11 +9,11 @@ namespace ET.Client
|
|
|
//相机跟随主角
|
|
|
public static void FollowMe(Vector3 pos)
|
|
|
{
|
|
|
- var camera = Camera.main;
|
|
|
+ /*var camera = Camera.main;
|
|
|
pos.x += 7;
|
|
|
pos.y = 15;
|
|
|
pos.z -= 25;
|
|
|
- camera.transform.position = pos;
|
|
|
+ camera.transform.position = pos;*/
|
|
|
}
|
|
|
|
|
|
private static bool bShaking = false;
|
|
@@ -31,5 +30,21 @@ namespace ET.Client
|
|
|
bShaking = false;
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ public static Vector3 CarmeraPos()
|
|
|
+ {
|
|
|
+ return Camera.main.transform.position;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void DragCamera(Vector3 start, Vector3 end, float duration, System.Action endcb)
|
|
|
+ {
|
|
|
+ Transform trans = GlobalViewComponent.Instance.BattleCamera.transform;
|
|
|
+ trans.position = start;
|
|
|
+ var tweener = trans.DOMove(end, duration);
|
|
|
+ tweener.OnComplete<Tweener>(() =>
|
|
|
+ {
|
|
|
+ endcb ?.Invoke();
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|