Эх сурвалжийг харах

修改元宵活动拖拽移动范围

leiyasi 1 жил өмнө
parent
commit
3eb80ac919

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ActivityGetYuanXiao/UI_ActivityGetYuanXiaoUI.cs

@@ -24,6 +24,8 @@ namespace UI.ActivityGetYuanXiao
         public GTextField m_progress;
         public GTextField m_targetScore;
         public GGraph m_startEffect;
+        public GGraph m_startLeft;
+        public GGraph m_startRight;
         public const string URL = "ui://tguohf7ux0ey0";
         public const string PACKAGE_NAME = "ActivityGetYuanXiao";
         public const string RES_NAME = "ActivityGetYuanXiaoUI";
@@ -88,6 +90,8 @@ namespace UI.ActivityGetYuanXiao
             m_progress = (GTextField)comp.GetChild("progress");
             m_targetScore = (GTextField)comp.GetChild("targetScore");
             m_startEffect = (GGraph)comp.GetChild("startEffect");
+            m_startLeft = (GGraph)comp.GetChild("startLeft");
+            m_startRight = (GGraph)comp.GetChild("startRight");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -110,6 +114,8 @@ namespace UI.ActivityGetYuanXiao
             m_progress = null;
             m_targetScore = null;
             m_startEffect = null;
+            m_startLeft = null;
+            m_startRight = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/ActivityGetYuanXiao/ActivityGetYuanXiaoView.cs

@@ -236,7 +236,8 @@ namespace GFGGame
         {
             _ui.m_catcher.target.visible = true;
             _ui.m_catcher.target.draggable = true;
-            _ui.m_catcher.target.dragBounds = new Rect(-_ui.m_catcher.target.width / 2, _ui.m_catcher.target.y, Stage.inst.width + _ui.m_catcher.target.width, 0);
+            //_ui.m_catcher.target.dragBounds = new Rect(-_ui.m_catcher.target.width / 2, _ui.m_catcher.target.y, Stage.inst.width + _ui.m_catcher.target.width, 0);
+            _ui.m_catcher.target.dragBounds = new Rect(_ui.m_startLeft.x, _ui.m_catcher.target.y, _ui.m_startRight.x - _ui.m_startLeft.x, 0);
         }
 
         private void StartGame()

BIN
GameClient/Assets/ResIn/UI/ActivityGetYuanXiao/ActivityGetYuanXiao_fui.bytes