Browse Source

对战报错

zhaoyang 2 years ago
parent
commit
77af2c43b1

+ 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;