소스 검색

对战报错

zhaoyang 2 년 전
부모
커밋
77af2c43b1
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightTargetScoreView.cs

@@ -447,8 +447,9 @@ namespace GFGGame
         private void PartScoreStart()
         {
             _ui.m_comClick.target.touchable = !_isAutoPlay;
-
-            Vector2 pos = (_ui.m_comClick.target.GetChild("grh_" + (_partId - 1)).asGraph).xy;
+            GObject graph = _ui.m_comClick.target.GetChild("grh_" + (_partId - 1));
+            if (graph == null) return;
+            Vector2 pos = graph.xy;
             float x = 0f;
             float y = 0f;