zhaoyang 2 жил өмнө
parent
commit
8c030a2bd8

+ 6 - 5
GameClient/Assets/Game/HotUpdate/Views/Guide/GuideView.cs

@@ -152,10 +152,11 @@ namespace GFGGame
             if (guideTarget != null)
             {
                 Vector2 pos = guideTarget.LocalToGlobal(Vector2.zero);
-                pos = _ui.target.GlobalToLocal(pos);
-                pos.x = pos.x + guideTarget.width / 2;
-                pos.y = pos.y + guideTarget.height / 2;
-                if (_ui.m_mask.m_guideArea.xy == pos)
+                Vector2 logicScreenPos = GRoot.inst.GlobalToLocal(pos);
+                // pos = _ui.m_mask.target.GlobalToLocal(pos);
+                logicScreenPos.x = logicScreenPos.x + guideTarget.width / 2;
+                logicScreenPos.y = logicScreenPos.y + guideTarget.height / 2;
+                if (_ui.m_mask.m_guideArea.xy == logicScreenPos)
                 {
                     Timers.inst.Remove(UpdateGuideRect);
                     _ui.m_comHolder.target.xy = _ui.m_mask.m_guideArea.xy;
@@ -187,7 +188,7 @@ namespace GFGGame
                     }
                     return;
                 }
-                _ui.m_mask.m_guideArea.SetXY(pos.x, pos.y);
+                _ui.m_mask.m_guideArea.SetXY(logicScreenPos.x, logicScreenPos.y);
 
             }
         }