lvjincheng il y a 4 ans
Parent
commit
47b892e6e9

+ 4 - 1
Assets/BowArrow/Scenes/GameChallengeScene/HunterGameSettleView.cs

@@ -67,7 +67,10 @@ public class HunterGameSettleView : MonoBehaviour
         if (GlobalData.pkMatchType == PKMatchType.OnlinePK) {
             PKMatchingView view = PKMatchingView.Create();
             view.InitForInviterToTryAgain();
-            view.eventOnRejectPKInvite += GoHomeLogic;
+            view.eventOnRejectPKInvite += () => {
+                view.banBackBtnLogic = true;
+                DoTweenUtil.CallDelay(2f, GoHomeLogic);
+            }; 
         } else {
             SceneManager.LoadScene("GameChallenge", LoadSceneMode.Single);
         }

+ 4 - 1
Assets/BowArrow/Scripts/View/PKGameSettleView.cs

@@ -66,7 +66,10 @@ public class PKGameSettleView : MonoBehaviour
         if (GlobalData.pkMatchType == PKMatchType.OnlinePK) {
             PKMatchingView view = PKMatchingView.Create();
             view.InitForInviterToTryAgain();
-            view.eventOnRejectPKInvite += GoHomeLogic; 
+            view.eventOnRejectPKInvite += () => {
+                view.banBackBtnLogic = true;
+                DoTweenUtil.CallDelay(2f, GoHomeLogic);
+            }; 
         } else {
             SceneManager.LoadScene("Game", LoadSceneMode.Single);
         }

+ 2 - 0
Assets/BowArrow/Scripts/View/PKMatchingView.cs

@@ -131,8 +131,10 @@ public class PKMatchingView : MonoBehaviour
         this.transform.Find("Back").gameObject.SetActive(false);
     }
 
+    [NonSerialized] public bool banBackBtnLogic;
     public void Back() {
         AudioMgr.ins.PlayBtn();
+        if (banBackBtnLogic) return;
         Destroy(this.gameObject);
     }