From 3c54c3efb141adf11146eff7678e363f1be9cad3 Mon Sep 17 00:00:00 2001 From: wangguan <wangguan@kt007.com> Date: Tue, 22 Dec 2020 10:27:30 +0800 Subject: [PATCH] 调整技能等级为1级 调整血量字体 调整合成区域使用动作 --- Assets/Scripts/Core/Camera/ViewPortAdj.cs | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Core/Camera/ViewPortAdj.cs b/Assets/Scripts/Core/Camera/ViewPortAdj.cs index ab9c37f..8c94784 100644 --- a/Assets/Scripts/Core/Camera/ViewPortAdj.cs +++ b/Assets/Scripts/Core/Camera/ViewPortAdj.cs @@ -11,15 +11,29 @@ /// </summary> public UnityEngine.Camera cachedCamera { get; private set; } + private Vector3 cachedCameraPos; + public UnityEngine.Camera backGroundCamera { get; private set; } + private Vector3 backGroundCameraPos; public bool bAdjViewPort = false; public void DOShakePosition() { - cachedCamera.DOShakePosition(0.25f, 1.5f, 4); - backGroundCamera.DOShakePosition(0.25f, 1.5f, 4); + KTGMGemClient.GameConfig.IsShaking = true; + cachedCamera.DOShakePosition(0.25f, 1.5f, 4).OnComplete(() => + { + KTGMGemClient.GameConfig.IsShaking = false; + cachedCamera.transform.position = cachedCameraPos; + + }); + backGroundCamera.DOShakePosition(0.25f, 1.5f, 4).OnComplete(() => + { + backGroundCamera.transform.position = backGroundCameraPos; + }); } + + public void adjViewportRect() { @@ -41,6 +55,9 @@ base.Awake(); cachedCamera = GetComponent<UnityEngine.Camera>(); backGroundCamera = GameObject.Find("BackCamera").GetComponent<UnityEngine.Camera>(); + + cachedCameraPos = cachedCamera.transform.position; + backGroundCameraPos = backGroundCamera.transform.position; } // Start is called before the first frame update -- Gitblit v1.9.1