zhaoyang 2 gadi atpakaļ
vecāks
revīzija
38a36a92b8

+ 3 - 3
FGUIProject/assets/DailyWelfare/DailyWelfareUI.xml

@@ -23,11 +23,11 @@
       <Button title="分享好礼" controller="c1" page="2"/>
     </component>
     <group id="n7_fqor" name="n7" xy="43,347" size="870,70" advanced="true" layout="hz" excludeInvisibles="true"/>
-    <component id="n8_fqor" name="proSign" src="fqor7" fileName="components/ProgressBar1.xml" xy="115,524" pivot="0,0.5" anchor="true" group="n21_fqor">
+    <component id="n8_fqor" name="proSign" src="fqor7" fileName="components/ProgressBar1.xml" xy="115,569" pivot="0,0.5" anchor="true" group="n21_fqor">
       <ProgressBar value="50" max="100"/>
     </component>
     <text id="n9_fqor" name="txtSignCount" xy="53,448" pivot="0.5,0" size="20,41" group="n21_fqor" fontSize="30" text="1"/>
-    <list id="n20_fqor" name="list" xy="53,616" size="974,1130" group="n21_fqor" layout="flow_hz" lineGap="20" colGap="20" defaultItem="ui://t8nwuj7ifqor9" autoClearItems="true">
+    <list id="n20_fqor" name="list" xy="53,660" size="974,1232" group="n21_fqor" layout="flow_hz" lineGap="30" colGap="60" defaultItem="ui://t8nwuj7ifqor9" align="center" autoClearItems="true">
       <relation target="" sidePair="bottomext-bottom"/>
       <item/>
       <item/>
@@ -61,7 +61,7 @@
       <item/>
       <item/>
     </list>
-    <group id="n21_fqor" name="n21" xy="53,448" size="974,1298" advanced="true">
+    <group id="n21_fqor" name="n21" xy="53,448" size="974,1444" advanced="true">
       <gearDisplay controller="c1" pages="0"/>
     </group>
     <component id="n22_fqor" name="comSupply0" src="fqora" fileName="components/ComSupply.xml" xy="242,827" group="n26_fqor"/>

+ 8 - 7
FGUIProject/assets/DailyWelfare/components/ListSignItem.xml

@@ -1,17 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="178,143">
+<component size="178,122">
   <controller name="c1" pages="0,,1,,2," selected="0">
     <remark page="1" value="金卡"/>
     <remark page="2" value="黑金"/>
   </controller>
   <displayList>
-    <loader id="n15_fqor" name="loaDoubleTag" xy="35,7" size="117,28" autoSize="true">
+    <loader id="n15_fqor" name="loaDoubleTag" xy="35,0" size="117,28" group="n20_fqor" autoSize="true">
       <gearIcon controller="c1" pages="0,2" values="|ui://t8nwuj7ifqorb" default="ui://t8nwuj7ifqorc"/>
     </loader>
-    <loader id="n14_fqor" name="loaIcon" xy="24,51" pivot="0.5,0.5" size="92,92" aspect="true" fill="scale"/>
-    <text id="n17_fqor" name="txtCount" xy="121,99" size="40,42" fontSize="30" text=""/>
-    <text id="n16_fqor" name="txtDay" xy="121,52" size="40,42" fontSize="30" text=""/>
-    <image id="n18_fqor" name="imgGot" src="fka77" fileName="imagesExport/cj_yihde.png" pkg="eg2y0ldp" xy="19,82"/>
-    <image id="n19_fqor" name="imgNotGet" src="cs8jthx" fileName="images/yx_whd.png" pkg="eg2y0ldp" xy="0,78"/>
+    <loader id="n14_fqor" name="loaIcon" xy="24,29" pivot="0.5,0.5" size="92,92" group="n20_fqor" aspect="true" fill="scale"/>
+    <text id="n17_fqor" name="txtCount" xy="121,77" size="40,42" group="n20_fqor" fontSize="30" text=""/>
+    <text id="n16_fqor" name="txtDay" xy="121,30" size="40,42" group="n20_fqor" fontSize="30" text=""/>
+    <image id="n18_fqor" name="imgGot" src="fka77" fileName="imagesExport/cj_yihde.png" pkg="eg2y0ldp" xy="19,60" size="144,32" group="n20_fqor"/>
+    <image id="n19_fqor" name="imgNotGet" src="cs8jthx" fileName="images/yx_whd.png" pkg="eg2y0ldp" xy="0,56" size="178,40" group="n20_fqor"/>
+    <group id="n20_fqor" name="n20" xy="0,0" size="178,121"/>
   </displayList>
 </component>

+ 7 - 5
FGUIProject/assets/League/LeagueAnsweringUI.xml

@@ -4,15 +4,15 @@
     <remark page="0" value="有图标"/>
     <remark page="1" value="无图标"/>
   </controller>
-  <controller name="ctrlQuestionState" pages="0,,1," selected="1">
+  <controller name="ctrlQuestionState" pages="0,,1," selected="0">
     <remark page="0" value="答题中"/>
     <remark page="1" value="cd中"/>
   </controller>
-  <controller name="ctrlQuestionType" pages="0,,1,,2," selected="0">
+  <controller name="ctrlQuestionType" pages="0,,1,,2," selected="2">
     <remark page="1" value="选择题"/>
     <remark page="2" value="填空题"/>
   </controller>
-  <controller name="ctrlResult" pages="0,,1,,2,,3," selected="0">
+  <controller name="ctrlResult" pages="0,,1,,2,,3," selected="2">
     <remark page="1" value="有人答对题目"/>
     <remark page="2" value="没人答对题目"/>
     <remark page="3" value="全部题目答完"/>
@@ -57,10 +57,12 @@
       <item/>
       <item/>
     </list>
-    <text id="n16_pvb4" name="n16" xy="360,472" size="241,41" group="n19_pvb4" font="ui://eg2y0ldpa0cftks" fontSize="30" color="#b68f52" align="center" text="请入您的答案:">
+    <text id="n16_pvb4" name="n16" xy="360,472" size="241,41" group="n19_pvb4" font="ui://eg2y0ldpa0cftks" fontSize="30" color="#b68f52" align="center" text="请入您的答案:">
       <gearText controller="ctrlQuestionType" pages="1,2" values="请选择您的答案:|请输入您的答案:" default="请填入您的答案:"/>
     </text>
-    <text id="n17_pvb4" name="txtResult" xy="602,470" size="123,42" group="n19_pvb4" fontSize="30" color="#b68f52" align="center" autoSize="none" text="" input="true"/>
+    <text id="n17_pvb4" name="txtResult" xy="602,470" size="123,42" group="n19_pvb4" fontSize="30" color="#b68f52" align="center" autoSize="none" text="" input="true">
+      <gearDisplay controller="ctrlQuestionType" pages="2"/>
+    </text>
     <text id="n18_pvb4" name="n18" xy="603,470" size="124,42" group="n19_pvb4" fontSize="30" color="#b68f52" align="center" autoSize="none" underline="true" text="                       ">
       <gearDisplay controller="ctrlQuestionType" pages="2"/>
     </text>

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Data/DailyWelfareManager.cs

@@ -11,9 +11,9 @@ namespace GFGGame
 
     public class DailyWelfareManager : SingletonBase<DailyWelfareManager>
     {
-        public List<int> DailySignDatas = new List<int>();//记录本月已签到日期
-        public List<int> AccumulatedSignDatas = new List<int>();//记录本月已领奖励的进度日期,5,10,15,20,25
-        public List<int> SupplyRewardDatas = new List<int>();//记录今日已领补给id
+        // public List<int> DailySignDatas = new List<int>();//记录本月已签到日期
+        // public List<int> AccumulatedSignDatas = new List<int>();//记录本月已领奖励的进度日期,5,10,15,20,25
+        // public List<int> SupplyRewardDatas = new List<int>();//记录今日已领补给id
         public static void Clear()
         {
 

+ 4 - 4
GameClient/Assets/Game/HotUpdate/ServerProxy/DailyWelfareSProxy.cs

@@ -42,7 +42,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    DailyWelfareManager.Instance.DailySignDatas.Add(DateTime.Now.Day);
+                    // DailyWelfareManager.Instance.DailySignDatas.Add(DateTime.Now.Day);
                     List<ItemData> bonus = ItemUtil.CreateItemDataList(response.reward);
                     BonusController.TryShowBonusList(bonus);
                     return true;
@@ -59,7 +59,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    DailyWelfareManager.Instance.DailySignDatas.Add(day);
+                    // DailyWelfareManager.Instance.DailySignDatas.Add(day);
                     List<ItemData> bonus = ItemUtil.CreateItemDataList(response.reward);
                     BonusController.TryShowBonusList(bonus);
                     return true;
@@ -76,7 +76,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    DailyWelfareManager.Instance.AccumulatedSignDatas.Add(day);
+                    // DailyWelfareManager.Instance.AccumulatedSignDatas.Add(day);
                     List<ItemData> bonus = ItemUtil.CreateItemDataList(response.reward);
                     BonusController.TryShowBonusList(bonus);
                     return true;
@@ -93,7 +93,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    DailyWelfareManager.Instance.SupplyRewardDatas.Add(id);
+                    // DailyWelfareManager.Instance.SupplyRewardDatas.Add(id);
                     List<ItemData> bonus = ItemUtil.CreateItemDataList(response.reward);
                     BonusController.TryShowBonusList(bonus);
                     return true;

+ 32 - 13
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/DailyWelfareView.cs

@@ -13,6 +13,7 @@ namespace GFGGame
         private UI_DailyWelfareUI _ui;
         private ValueBarController _valueBarController;
 
+        private int _signCount;
         private int _month;
         private int _day;
 
@@ -70,44 +71,54 @@ namespace GFGGame
         }
         private void UpdateSgignView()
         {
-            _ui.m_txtSignCount.text = DailyWelfareManager.Instance.DailySignDatas.Count.ToString();
-            _ui.m_proSign.target.max = DailySignCfgArray.Instance.GetCfgsBymonth(_month).Count;
-            _ui.m_proSign.target.value = DailyWelfareManager.Instance.DailySignDatas.Count;
+            _signCount = MathHelper.CountOnes(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignDay));
+            _ui.m_txtSignCount.text = _signCount.ToString();// DailyWelfareManager.Instance.DailySignDatas.Count.ToString();
+            List<DailySignBonusCfg> signBonusCfgs = DailySignBonusCfgArray.Instance.GetCfgsBymonth(_month);
+            _ui.m_proSign.target.max = signBonusCfgs.Count;
+            _ui.m_proSign.target.value = _signCount;
             List<DailySignCfg> signCfgs = DailySignCfgArray.Instance.GetCfgsBymonth(_month);
             for (int i = 0; i < signCfgs.Count; i++)
             {
                 GComponent comProBonus = _ui.m_proSign.target.GetChild("comProBonus" + i).asCom;
-                comProBonus.x = (signCfgs[i].day / (float)_ui.m_proSign.target.max) * _ui.m_proSign.target.width;
+                comProBonus.x = ((float)signCfgs[i].day / (float)signBonusCfgs.Count) * _ui.m_proSign.target.width;
                 UI_ComProBonus item = UI_ComProBonus.Proxy(comProBonus);
                 item.m_loaIcon.url = ResPathUtil.GetIconPath(ItemCfgArray.Instance.GetCfg(signCfgs[i].bonusArr[0][0]));
                 item.m_txtCount.text = signCfgs[i].bonusArr[0][1].ToString();
                 item.m_txtDay.text = signCfgs[i].day.ToString();
+                if (item.target.data == null)
+                {
+                    item.target.onClick.Add(OnBtnGetProBonus);
+                }
+                item.target.data = signCfgs[i];
                 UI_ComProBonus.ProxyEnd();
             }
-            _ui.m_list.numItems = DailySignCfgArray.Instance.GetCfgsBymonth(_month).Count;
+            _ui.m_list.numItems = signBonusCfgs.Count;
         }
-        private void UpdateSupplyView()
+        private void OnBtnGetProBonus(EventContext context)
         {
-
+            GObject obj = context.sender as GObject;
+            DailySignCfg signCfg = obj.data as DailySignCfg;
         }
-        private void UpdateReward()
+        private void UpdateSupplyView()
         {
 
         }
+
         private void ListItemRender(int index, GObject obj)
         {
             DailySignBonusCfg bonusCfg = DailySignBonusCfgArray.Instance.GetCfgsBymonth(_month)[index];
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(bonusCfg.bonusArr[0][0]);
-
+            bool isGot = MathHelper.isBitSet(_signCount, bonusCfg.day);
+            if (itemCfg == null) return;
             UI_ListSignItem item = UI_ListSignItem.Proxy(obj);
 
-            item.m_c1.selectedIndex = itemCfg.itemType == ConstItemType.ITEM ? 0 : bonusCfg.type;
+            item.m_c1.selectedIndex = itemCfg.itemType == ConstItemType.DRESS_UP ? 0 : bonusCfg.type;
             item.m_txtDay.text = bonusCfg.day.ToString();
             item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
             item.m_txtCount.text = bonusCfg.bonusArr[0][1].ToString();
-            item.m_imgGot.visible = DailyWelfareManager.Instance.DailySignDatas.IndexOf(bonusCfg.day) >= 0;
-            item.m_imgNotGet.visible = bonusCfg.day < _day && DailyWelfareManager.Instance.DailySignDatas.IndexOf(bonusCfg.day) >= 0;
-            RedDotController.Instance.SetComRedDot(item.target, bonusCfg.day == _day && DailyWelfareManager.Instance.DailySignDatas.IndexOf(bonusCfg.day) < 0);
+            item.m_imgGot.visible = isGot;// bonusCfg.day <= _day && DailyWelfareManager.Instance.DailySignDatas.IndexOf(bonusCfg.day) >= 0;
+            item.m_imgNotGet.visible = bonusCfg.day < _day && !isGot;
+            RedDotController.Instance.SetComRedDot(item.target, bonusCfg.day == _day && !isGot);
             if (item.target.data == null)
             {
                 item.target.onClick.Add(OnGetSignBonus);
@@ -140,6 +151,14 @@ namespace GFGGame
                 _ui.m_list.numItems = DailySignCfgArray.Instance.GetCfgsBymonth(_month).Count;
             }
         }
+        private void UpdateReward(GObject obj, int id)
+        {
+            DailySupplyCfg supplyCfg = DailySupplyCfgArray.Instance.GetCfg(id);
+
+            UI_ComSupply item = UI_ComSupply.Proxy(obj);
+
+            UI_ComSupply.ProxyEnd();
+        }
         private void ListBonusItemRender(int index, GObject obj)
         {
 

+ 7 - 5
GameClient/Assets/Game/HotUpdate/Views/League/LeagueAnsweringView.cs

@@ -47,11 +47,12 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             base.AddEventListener();
-            EventAgent.AddEventListener(ConstMessage.LEAGUE_ANSWER_START, UpdateQuestion);
-            EventAgent.AddEventListener(ConstMessage.LEAGUE_ANSWER_END, UpdateResult);
-            EventAgent.AddEventListener(ConstMessage.LEAGUE_ANSWER_RESULT_CHANGE, UpdateResult);
-            EventAgent.AddEventListener(ConstMessage.LEAGUE_ANSWER_RESULT_CHANGE, UpdateJoinList);
-            EventAgent.AddEventListener(ConstMessage.LEAGUE_ANSWER_MEMBER_CHANGE, UpdateJoinList);
+            // EventAgent.AddEventListener(ConstMessage.LEAGUE_ANSWER_START, UpdateQuestion);
+            // EventAgent.AddEventListener(ConstMessage.LEAGUE_ANSWER_END, UpdateResult);
+            // EventAgent.AddEventListener(ConstMessage.LEAGUE_ANSWER_RESULT_CHANGE, UpdateResult);
+            // EventAgent.AddEventListener(ConstMessage.LEAGUE_ANSWER_RESULT_CHANGE, UpdateJoinList);
+            // EventAgent.AddEventListener(ConstMessage.LEAGUE_ANSWER_MEMBER_CHANGE, UpdateJoinList);
+            EventAgent.AddEventListener(ConstMessage.LEAGUE_NUMBERIC_CHANGE, UpdateQuestionState);
             EventAgent.AddEventListener(ConstMessage.NOTICE_CHAT_MESSAGE, UpdateChatList);
         }
         protected override async void OnShown()
@@ -142,6 +143,7 @@ namespace GFGGame
             {
                 UpdateResult();
             }
+            UpdateJoinList();
         }
         private void UpdateQuestion()
         {

BIN
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes


BIN
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_fui.bytes


BIN
GameClient/Assets/ResIn/UI/League/League_fui.bytes