zhaoyang %!s(int64=2) %!d(string=hai) anos
pai
achega
8c030a2bd8
Modificáronse 1 ficheiros con 6 adicións e 5 borrados
  1. 6 5
      GameClient/Assets/Game/HotUpdate/Views/Guide/GuideView.cs

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

@@ -152,10 +152,11 @@ namespace GFGGame
             if (guideTarget != null)
             if (guideTarget != null)
             {
             {
                 Vector2 pos = guideTarget.LocalToGlobal(Vector2.zero);
                 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);
                     Timers.inst.Remove(UpdateGuideRect);
                     _ui.m_comHolder.target.xy = _ui.m_mask.m_guideArea.xy;
                     _ui.m_comHolder.target.xy = _ui.m_mask.m_guideArea.xy;
@@ -187,7 +188,7 @@ namespace GFGGame
                     }
                     }
                     return;
                     return;
                 }
                 }
-                _ui.m_mask.m_guideArea.SetXY(pos.x, pos.y);
+                _ui.m_mask.m_guideArea.SetXY(logicScreenPos.x, logicScreenPos.y);
 
 
             }
             }
         }
         }