浏览代码

修复结束时拖拽不松手导致返回界面后,无法监听拖拽事件的bug
修改元宵活动的商城跳转

leiyasi 1 年之前
父节点
当前提交
94435015a1

+ 6 - 6
GameClient/Assets/Game/HotUpdate/Views/ActivityGetYuanXiao/ActivityGetYuanXiaoDataManager.cs

@@ -6,11 +6,11 @@ namespace GFGGame
 {
     public class ActivityGetYuanXiaoDataManager : SingletonBase<ActivityGetYuanXiaoDataManager>
     {
-        //public bool CheckOpen()
-        //{
-        //    var activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfoOneByType(ActivityType.YuanXiao);
-        //    return activityInfo != null && activityInfo.StartTime <= TimeHelper.ServerNow() &&
-        //           activityInfo.EndTime > TimeHelper.ServerNow();
-        //}
+        public bool CheckOpen()
+        {
+            var activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfoOneByType(ActivityType.YuanXiao);
+            return activityInfo != null && activityInfo.StartTime <= TimeHelper.ServerNow() &&
+                   activityInfo.EndTime > TimeHelper.ServerNow();
+        }
     }
 }

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

@@ -174,7 +174,7 @@ namespace GFGGame
 
         private void OnBtnShopClick()
         {
-            ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_GIFT_BAG, ConstStoreSubId.STORE_GIFT_BAG_ACTIVITY });
+            ViewManager.Show<StoreView>(new object[] { ConstStoreTabId.STORE_EXCHANGE, ConstStoreSubId.STORE_ACTIVITY_EXCHANGE });
         }
 
         private void OnBtnTaskClick()

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

@@ -36,8 +36,7 @@ namespace GFGGame
             modal = true;
 
             _ui.m_itemList.itemRenderer = ListRenderer;
-            //_funcType = TaskFuncType.YuanXiaoActivity;
-            _funcType = TaskFuncType.BattlePass;
+            _funcType = TaskFuncType.YuanXiaoActivity;
         }
 
         protected override void OnShown()

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

@@ -235,6 +235,7 @@ namespace GFGGame
 
         public void SetDragRect()
         {
+            _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, Screen.width + _ui.m_catcher.target.width, 0);
         }
@@ -242,6 +243,7 @@ namespace GFGGame
         private void StartGame()
         {
             CreateItems(null);
+            UpdateTime(null);
             Timers.inst.Add(1, 0, UpdateTime);
             Timers.inst.AddUpdate(UpdateGame);
         }
@@ -265,6 +267,7 @@ namespace GFGGame
 
             _ui.m_time.text = TimeUtil.FormattingTimeTo_mmss(_countTime * 1000);
             --_countTime;
+                
             if (_countTime < 0)
             {
                 Timers.inst.Remove(UpdateTime);
@@ -274,7 +277,8 @@ namespace GFGGame
 
         private async void GameEnd()
         {
-            _ui.m_catcher.target.draggable = false;
+            //_ui.m_catcher.target.draggable = false;
+            _ui.m_catcher.target.visible = false;
             HideGameView();
 
             bool win = true;

二进制
GameClient/Assets/ResIn/UI/ActivityGetYuanXiao/ActivityGetYuanXiao_fui.bytes