Răsfoiți Sursa

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

zhaoyang 2 ani în urmă
părinte
comite
edba63e4d7

+ 6 - 4
FGUIProject/assets/EnduringGiftBox/RushSaleGiftBoxUI.xml

@@ -11,17 +11,17 @@
     <text id="n4_yjmk" name="txtBoxItemName" xy="363,207" size="283,65" group="n23_droi" fontSize="40" color="#fffbf5" align="center" autoSize="none" strokeColor="#d69546" text="体力限时礼包"/>
     <image id="n6_yjmk" name="n6" src="yjmk2n" fileName="images/xsqg_sj_db.png" xy="639,216" group="n23_droi"/>
     <text id="n8_yjmk" name="txtBoxResidueTime" xy="683,214" size="207,48" group="n23_droi" fontSize="35" color="#fffbf5" align="center" autoSize="none" text="6天23分23秒"/>
-    <list id="n11_yjmk" name="list" xy="344,377" size="425,203" group="n23_droi" layout="flow_vt" overflow="scroll" scroll="horizontal" scrollBarFlags="32" colGap="50" defaultItem="ui://bdi1qe15yjmk2p" align="center">
+    <list id="n11_yjmk" name="list" xy="344,377" size="425,203" group="n23_droi" alpha="0" layout="flow_vt" overflow="scroll" scroll="horizontal" scrollBarFlags="32" colGap="50" defaultItem="ui://bdi1qe15yjmk2p" align="center">
       <item/>
       <item/>
     </list>
     <image id="n12_yjmk" name="n12" src="yjmk2b" fileName="images/xsqg_zsx.png" xy="302,602" group="n23_droi"/>
     <text id="n13_yjmk" name="txtUrc" xy="453,623" size="224,68" group="n23_droi" fontSize="34" color="#b8857b" align="center" vAlign="middle" autoSize="shrink" text="今日限购0/1"/>
     <component id="n15_yjmk" name="btnBuyPink" src="yjmk2q" fileName="components/BtnBuyPink.xml" xy="408,693" group="n23_droi"/>
-    <graph id="n25_droi" name="holderBtnBy" xy="570,735" size="46,29" group="n23_droi"/>
+    <graph id="n25_droi" name="holderBtnBy" xy="570,744" size="46,29" group="n23_droi"/>
     <graph id="n27_droi" name="holderZheKouChiXu" xy="394,692" size="33,33" group="n23_droi"/>
     <component id="n14_yjmk" name="comDiscount" src="yjmk2r" fileName="components/ComDiscount2.xml" xy="333,642" group="n23_droi"/>
-    <graph id="n26_droi" name="holderZheKou" xy="399,697" size="19,18" group="n23_droi"/>
+    <graph id="n26_droi" name="holderZheKou" xy="417,710" size="65,64" group="n23_droi"/>
     <text id="n16_yjmk" name="txtLrc" xy="379,787" size="380,46" group="n23_droi" fontSize="34" color="#b8857b" align="center" autoSize="shrink" text="可获得60充值经验"/>
     <graph id="n28_droi" name="holderStar" xy="554,470" size="43,38" group="n23_droi"/>
     <group id="n23_droi" name="n23" xy="193,207" size="746,626"/>
@@ -46,6 +46,7 @@
     <item time="0" type="Alpha" target="n8_yjmk" value="0"/>
     <item time="0" type="Alpha" target="n8_yjmk" value="0"/>
     <item time="0" type="Scale" target="n24_droi" tween="true" startValue="0.95,0.95" endValue="1,1" duration="12" ease="Linear"/>
+    <item time="0" type="Visible" target="n11_yjmk" value="false"/>
     <item time="0" type="Visible" target="n24_droi" value="false"/>
     <item time="0" type="Visible" target="n27_droi" value="false"/>
     <item time="0" type="XY" target="n19_droi" tween="true" startValue="70,380" endValue="63,380" duration="10" ease="Linear"/>
@@ -53,8 +54,8 @@
     <item time="0" type="XY" target="n24_droi" tween="true" startValue="274,290" endValue="263,282" duration="12" ease="Linear"/>
     <item time="0" type="XY" target="n2_yjmk" tween="true" startValue="335,20" endValue="335,26" duration="11" ease="Linear"/>
     <item time="6" type="Visible" target="n24_droi" value="true"/>
+    <item time="12" type="Alpha" target="n11_yjmk" tween="true" startValue="0.2" endValue="1" duration="14" ease="Linear"/>
     <item time="12" type="Visible" target="n27_droi" value="true"/>
-    <item time="15" type="Alpha" target="n11_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
     <item time="15" type="Alpha" target="n12_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
     <item time="15" type="Alpha" target="n13_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
     <item time="15" type="Alpha" target="n14_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Linear"/>
@@ -65,5 +66,6 @@
     <item time="15" type="Alpha" target="n5_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Quart.Out"/>
     <item time="15" type="Alpha" target="n6_yjmk" tween="true" startValue="0" endValue="1" duration="14" ease="Quint.Out"/>
     <item time="15" type="Alpha" target="n8_yjmk" tween="true" startValue="0.2" endValue="1" duration="19" ease="Quint.Out"/>
+    <item time="35" type="Visible" target="n11_yjmk" value="true"/>
   </transition>
 </component>

+ 6 - 6
FGUIProject/assets/EnduringGiftBox/components/BtnBuyPink.xml

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="316,83" extention="Button">
+<component size="316,95" extention="Button">
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <displayList>
-    <image id="n7_yjmk" name="bagGrey" src="qqhzm" fileName="images/cz_an_grey.png" xy="0,7" size="316,75" aspect="true"/>
-    <image id="n6_yjmk" name="bagPink" src="yjmk3b" fileName="images/an_pink.png" xy="0,7" size="316,75" aspect="true"/>
-    <text id="n1_qqhz" name="txtNewPrice" xy="166,5" size="104,69" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" text="300元"/>
-    <text id="n2_qqhz" name="txtOldPrice" xy="47,5" size="84,69" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" align="right" vAlign="middle" autoSize="shrink" strike="true" text="2000"/>
-    <loader id="n5_yjmk" name="loaIcon" xy="122,22" size="33,31" fill="scale" shrinkOnly="true"/>
+    <image id="n7_yjmk" name="bagGrey" src="qqhzm" fileName="images/cz_an_grey.png" xy="0,7" size="316,92"/>
+    <image id="n6_yjmk" name="bagPink" src="yjmk3b" fileName="images/an_pink.png" xy="0,7" size="316,92"/>
+    <text id="n1_qqhz" name="txtNewPrice" xy="166,13" size="104,69" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" vAlign="middle" autoSize="shrink" text="300元"/>
+    <text id="n2_qqhz" name="txtOldPrice" xy="47,13" size="84,69" font="ui://eg2y0ldpa0cftkz" fontSize="32" color="#fffdf4" align="right" vAlign="middle" autoSize="shrink" strike="true" text="2000"/>
+    <loader id="n5_yjmk" name="loaIcon" xy="122,30" size="33,31" fill="scale" shrinkOnly="true"/>
   </displayList>
   <Button/>
 </component>

+ 5 - 0
FGUIProject/assets/EnduringGiftBox/components/ComRewardIconItem.xml

@@ -10,4 +10,9 @@
     <text id="n2_nd17" name="num" xy="9,85" size="116,44" font="ui://eg2y0ldpa0cftks" fontSize="32" color="#ffffff" align="center" autoSize="none" text="120"/>
     <graph id="n7_fter" name="holderItem" xy="68,69" size="71,63"/>
   </displayList>
+  <transition name="t0">
+    <item time="0" type="Alpha" target="n7_fter" tween="true" startValue="0" endValue="1" duration="9" ease="Linear"/>
+    <item time="0" type="Visible" target="n7_fter" value="false"/>
+    <item time="6" type="Visible" target="n7_fter" value="true"/>
+  </transition>
 </component>

+ 2 - 2
FGUIProject/assets/EnduringGiftBox/components/ComRsGifBoxIconItem.xml

@@ -3,10 +3,10 @@
   <displayList>
     <component id="n3_yjmk" name="comRewardIconItem" src="qqhz1g" fileName="components/ComRewardIconItem.xml" xy="3,2" size="132,132" aspect="true" scale="1.09,1.09"/>
     <text id="n1_yjmk" name="txtItemName" xy="6,138" size="143,56" fontSize="39" color="#a47e49" align="center" autoSize="none" text="体力"/>
-    <graph id="n4_droi" name="holderItem" xy="77,71" size="46,42"/>
+    <graph id="n4_droi" name="holderItem" xy="77,71" size="46,42" visible="false"/>
   </displayList>
   <transition name="t1">
     <item time="0" type="Visible" target="n4_droi" value="false"/>
-    <item time="12" type="Visible" target="n4_droi" value="true"/>
+    <item time="18" type="Visible" target="n4_droi" value="true"/>
   </transition>
 </component>

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -139,5 +139,8 @@ namespace GFGGame
         //通知通行证赛季变更
         public const string NOTICE_PASSPORT_SEASON_CHANGE = "NOTICE_PASSPORT_SEASON_CHANGE";
         
+        //通知任务状态变更
+        public const string NOTICE_TASK_STATE_CHANGE = "NOTICE_TASK_STATE_CHANGE";
+        
     }
 }

+ 3 - 4
GameClient/Assets/Game/HotUpdate/Data/ActivityDay7DataManager.cs

@@ -23,14 +23,13 @@ namespace GFGGame
 
         public bool CheckOpen()
         {
-            return GetActivityDay7Day() <= Activity7DaysCfgArray.Instance.dataArray.Length;
+            return GetEndTime() > TimeHelper.ServerNow();
         }
-        
+
         public long GetEndTime()
         {
-            //TODO 进行缓存
             return TimeUtil.TodayRestTime() +
-                   (Activity7DaysCfgArray.Instance.dataArray.Length - GetActivityDay7Day())
+                   (GlobalCfgArray.globalCfg.Activity7DaysLastTime - GetActivityDay7Day() + 1)
                    * TimeUtil.SECOND_PER_DAY * 1000;
         }
     }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/ArenaDataManager.cs

@@ -111,7 +111,7 @@ namespace GFGGame
         /// <value></value>
         public bool IsSeasonOpen
         {
-            get
+            get 
             {
                 ArenaOpenCfg cfg = ArenaOpenCfgArray.Instance.GetCfg(SeasonId);
                 if (TimeUtil.IsBeforeCurTime(cfg.openTime) && TimeUtil.IsLaterCurTime(cfg.endTime))

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Data/TaskDataManager.cs

@@ -143,9 +143,11 @@ namespace GFGGame
                     }
                     return string.Format(activeRewardCfg.desc, taskCfg.GetTargetCount(), name);
                 case ConstTaskType.UseItem:
-                case ConstTaskType.Suitsynthesis:
                     var cfg = ItemCfgArray.Instance.GetCfg(taskCfg.paramsArr[0]);
                     return string.Format(activeRewardCfg.desc, taskCfg.GetTargetCount(), cfg.name);
+                case ConstTaskType.Suitsynthesis:
+                    var suitCfg = SuitCfgArray.Instance.GetCfg(taskCfg.paramsArr[0]);
+                    return string.Format(activeRewardCfg.desc, taskCfg.GetTargetCount(), suitCfg.name);
                 case ConstTaskType.UpgradeCardLvl:
                 case ConstTaskType.UpgradeCardStar:
                     return string.Format(activeRewardCfg.desc, taskCfg.paramsArr[0], taskCfg.paramsArr[1]);

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/EnduringGiftBox/UI_ComRewardIconItem.cs

@@ -15,6 +15,7 @@ namespace UI.EnduringGiftBox
         public GImage m_bagBlueEx;
         public GTextField m_num;
         public GGraph m_holderItem;
+        public Transition m_t0;
         public const string URL = "ui://bdi1qe15qqhz1g";
         public const string PACKAGE_NAME = "EnduringGiftBox";
         public const string RES_NAME = "ComRewardIconItem";
@@ -70,6 +71,7 @@ namespace UI.EnduringGiftBox
             m_bagBlueEx = (GImage)comp.GetChild("bagBlueEx");
             m_num = (GTextField)comp.GetChild("num");
             m_holderItem = (GGraph)comp.GetChild("holderItem");
+            m_t0 = comp.GetTransition("t0");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -81,6 +83,7 @@ namespace UI.EnduringGiftBox
             m_bagBlueEx = null;
             m_num = null;
             m_holderItem = null;
+            m_t0 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/TaskSProxy.cs

@@ -17,7 +17,7 @@ namespace ET
                 Progress = message.TaskInfo.Progress
             };
             TaskDataManager.Instance.UpdateTaskInfo(taskInfo.ID, taskInfo);
-            EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
+            EventAgent.DispatchEvent(ConstMessage.NOTICE_TASK_STATE_CHANGE, taskInfo.ID);
             await ETTask.CompletedTask;
         }
     }

+ 20 - 0
GameClient/Assets/Game/HotUpdate/Views/ActivityDay7/ActivityDay7View.cs

@@ -71,6 +71,25 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, OnItemChange);
+            // ConstMessage.NOTICE_TASK_STATE_CHANGE
+            EventAgent.AddEventListener(ConstMessage.NOTICE_TASK_STATE_CHANGE, OnTaskChange);
+        }
+
+        private void OnTaskChange(EventContext context)
+        {
+            var taskId = (int)context.data;
+            var taskCfg = TaskCfgArray.Instance.GetCfg(taskId);
+            if (taskCfg == null) return;
+            if (taskCfg.taskType != TaskType.Day7) return;
+            SetTasks();
+        }
+
+        protected override void RemoveEventListener()
+        {
+            //ConstMessage.ITEM_CHANGED
+            EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, OnItemChange);
+            // ConstMessage.NOTICE_TASK_STATE_CHANGE
+            EventAgent.RemoveEventListener(ConstMessage.NOTICE_TASK_STATE_CHANGE, OnTaskChange);
         }
 
         private void OnItemChange(EventContext context)
@@ -224,6 +243,7 @@ namespace GFGGame
             //7日活动配置
             cfgDataArray = Activity7DaysTaskCfgArray.Instance.dataArray;
             _ui.m_DayList.numItems = cfgDataArray.Length;
+            _ui.m_DayList.ScrollToView(onClickDayIndex);
         }
 
         private void FreshGetStatus()

+ 17 - 2
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/RushSaleGiftBoxView.cs

@@ -23,7 +23,8 @@ namespace GFGGame
         private List<GGraph> _graphList = new List<GGraph>();
         private List<GameObject> _gameObjectList = new List<GameObject>();
         private List<GoWrapper> _wrapperList = new List<GoWrapper>();
-        
+        private List<Transition> _transitionList = new List<Transition>();
+
         private GameObject _gameObject1;
         private GameObject _gameObject2;
         private GameObject _gameObject3;
@@ -282,6 +283,9 @@ namespace GFGGame
                 _gameObjectList.Add(gameObject);
                 _wrapperList.Add(wrapper);
             }
+            
+            uiItem.m_t1.Play();
+            UI_RushSaleGiftBoxUI.ProxyEnd();
         }
 
         private void UpViewNone()
@@ -342,7 +346,7 @@ namespace GFGGame
                     GameObject.DestroyImmediate(itemGameObject);
                 }
             }
-            
+
             _gameObjectList.Clear();
 
             foreach (var itemWrapper in _wrapperList)
@@ -353,6 +357,17 @@ namespace GFGGame
                 }
             }
 
+            // foreach (var transition in _transitionList)
+            // {
+            //     if (transition != null)
+            //     {
+            //         transition.Stop(true, false);
+            //         transition.Dispose();
+            //         transition.PlayReverse();
+            //     }
+            // }
+            //  _transitionList.Clear();
+
             _wrapperList.Clear();
             _graphList.Clear();
         }

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Views/EnduringGiftBox/SpecialOfferGiftBoxView.cs

@@ -297,7 +297,7 @@ namespace GFGGame
             uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
             uiItemChild.m_num.text = itemArr[1].ToString();
             uiItemChild.target.data = itemCfgChild;
-
+            
             if (!_graphList.Contains(uiItemChild.m_holderItem))
             {
                 string resPath = ResPathUtil.GetViewEffectPath("ui_Activity", "Prefer_kuang");
@@ -307,6 +307,8 @@ namespace GFGGame
                 _gameObjectList.Add(gameObject);
                 _wrapperList.Add(wrapper);
             }
+            
+            uiItemChild.m_t0.Play();
 
             UI_ComRewardIconItem.ProxyEnd();
         }
@@ -395,7 +397,6 @@ namespace GFGGame
 
         protected override void OnHide()
         {
-            
             SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
             SceneController.DestroyObjectFromView(_gameObject2, _wrapper2);
             SceneController.DestroyObjectFromView(_gameObject3, _wrapper3);

+ 21 - 10
GameClient/Assets/Game/HotUpdate/Views/Task/CombTaskView.cs

@@ -55,11 +55,22 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             EventAgent.AddEventListener(ConstMessage.LIVENESS_CHANGE, UpdateLivenessProcess);
+            EventAgent.AddEventListener(ConstMessage.NOTICE_TASK_STATE_CHANGE, OnTaskChange);
         }
 
         protected override void RemoveEventListener()
         {
             EventAgent.RemoveEventListener(ConstMessage.LIVENESS_CHANGE, UpdateLivenessProcess);
+            EventAgent.RemoveEventListener(ConstMessage.NOTICE_TASK_STATE_CHANGE, OnTaskChange);
+        }
+
+        private void OnTaskChange(EventContext eventContext)
+        {
+            var taskId = (int)eventContext.data;
+            var taskCfg = TaskCfgArray.Instance.GetCfg(taskId);
+            if (taskCfg == null) return;
+            if (taskCfg.taskType != taskType) return;
+            UpdateTask();
         }
 
         //切换任务类型
@@ -199,17 +210,17 @@ namespace GFGGame
             switch (state)
             {
                 case ConstBonusStatus.CAN_NOT_GET:
-                    {
-                        var rewards = ItemUtil.CreateItemDataList(cfg.rewardsArr);
-                        ViewManager.Show<RewardPreView>(new object[] { rewards, "活跃度奖励", $"满足{cfg.count}活跃度可领取" });
-                        break;
-                    }
+                {
+                    var rewards = ItemUtil.CreateItemDataList(cfg.rewardsArr);
+                    ViewManager.Show<RewardPreView>(new object[] { rewards, "活跃度奖励", $"满足{cfg.count}活跃度可领取" });
+                    break;
+                }
                 case ConstBonusStatus.CAN_GET:
-                    {
-                        var result = await DailyTaskSProxy.ReqLivenessBox(cfg.id);
-                        if (result) UpdateLivenessProcess();
-                        break;
-                    }
+                {
+                    var result = await DailyTaskSProxy.ReqLivenessBox(cfg.id);
+                    if (result) UpdateLivenessProcess();
+                    break;
+                }
                 case ConstBonusStatus.GOT:
                     //领取完毕
                     break;

BIN
GameClient/Assets/ResIn/UI/EnduringGiftBox/EnduringGiftBox_fui.bytes