Browse Source

战斗报错处理

guodong 1 year ago
parent
commit
f7370272ed
1 changed files with 38 additions and 25 deletions
  1. 38 25
      GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

+ 38 - 25
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -603,10 +603,10 @@ namespace GFGGame
             var levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
             if (RoleDataManager.power < levelCfg.power)
             {
-                ItemUtil.AddPower(OnClickBtnPhotograph);
+                ItemUtil.AddPower(CheckCardOrNext);
                 return;
             }
-            OnClickBtnPhotograph();
+            CheckCardOrNext();
         }
         private bool CheckHasNeed()
         {
@@ -623,30 +623,43 @@ namespace GFGGame
             }
             return true;
         }
-        private void OnClickBtnPhotograph()
+        //private void OnClickBtnPhotograph()
+        //{
+        //    Timers.inst.StartCoroutine(ScreenShotTex());
+        //}
+        //private IEnumerator ScreenShotTex()
+        //{
+
+        //    GameObject Role = _sceneObject.transform.Find("Role").gameObject;
+        //    GameObject CopyRoleParent = _sceneObject.transform.Find("CopyRole").gameObject;
+        //    Transform CopyRole = CopyRoleParent.transform.Find("Role");
+        //    if (CopyRole != null)
+        //    {
+        //        GameObject.DestroyImmediate(CopyRole.gameObject);
+        //    }
+        //    Transform transform = GameObject.Instantiate(Role, CopyRoleParent.transform.position, Quaternion.identity).transform;//实例化物体
+        //    transform.parent = CopyRoleParent.transform;
+        //    transform.name = "Role";
+
+        //    GameObject gameObject = _sceneObject.transform.Find("FightCamera").gameObject;
+        //    Camera camera = gameObject.GetComponent<Camera>();
+        //    FightDataManager.Instance.RoleTextuex = FightDataManager.Instance.GetPrintscreenNTexture(camera);
+
+        //    yield return new WaitForEndOfFrame();
+
+        //    if (CardDataManager.GetCardListByRoleType(0).Count > 0)
+        //    {
+
+        //        ViewManager.Show<StoryCardChoose>(scoreType);
+        //    }
+        //    else
+        //    {
+        //        StartCalculateScore();
+        //    }
+        //}
+
+        private void CheckCardOrNext()
         {
-            Timers.inst.StartCoroutine(ScreenShotTex());
-        }
-        private IEnumerator ScreenShotTex()
-        {
-
-            GameObject Role = _sceneObject.transform.Find("Role").gameObject;
-            GameObject CopyRoleParent = _sceneObject.transform.Find("CopyRole").gameObject;
-            Transform CopyRole = CopyRoleParent.transform.Find("Role");
-            if (CopyRole != null)
-            {
-                GameObject.DestroyImmediate(CopyRole.gameObject);
-            }
-            Transform transform = GameObject.Instantiate(Role, CopyRoleParent.transform.position, Quaternion.identity).transform;//实例化物体
-            transform.parent = CopyRoleParent.transform;
-            transform.name = "Role";
-
-            GameObject gameObject = _sceneObject.transform.Find("FightCamera").gameObject;
-            Camera camera = gameObject.GetComponent<Camera>();
-            FightDataManager.Instance.RoleTextuex = FightDataManager.Instance.GetPrintscreenNTexture(camera);
-
-            yield return new WaitForEndOfFrame();
-
             if (CardDataManager.GetCardListByRoleType(0).Count > 0)
             {