浏览代码

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

leiyasi 1 年之前
父节点
当前提交
2c1657935b
共有 21 个文件被更改,包括 73 次插入13 次删除
  1. 13 8
      GameClient/Assets/Editor/Excel/CodeBuilder.cs
  2. 7 0
      GameClient/Assets/Editor/Excel/Template/ConfigArray.txt
  3. 1 0
      GameClient/Assets/Editor/Excel/Template/FunctionAll.txt
  4. 1 1
      GameClient/Assets/Editor/Excel/Template/FunctionGroup.txt
  5. 2 0
      GameClient/Assets/Editor/Excel/Template/FunctionSingle.txt
  6. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ActivityDay7/UI_ExpProcessItem.cs
  7. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_TaskListItem.cs
  8. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ListCardItem.cs
  9. 37 2
      GameClient/Assets/Game/HotUpdate/Views/ActivityDay7/ActivityDay7View.cs
  10. 2 2
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs
  11. 1 0
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryCardChoose.cs
  12. 二进制
      GameClient/Assets/ResIn/UI/ActivityDay7/ActivityDay7_fui.bytes
  13. 二进制
      GameClient/Assets/ResIn/UI/Card/Card_fui.bytes
  14. 二进制
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png
  15. 二进制
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png
  16. 二进制
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1!a.png
  17. 二进制
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1.png
  18. 二进制
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_2!a.png
  19. 二进制
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_2.png
  20. 二进制
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes
  21. 二进制
      GameClient/Assets/ResIn/UI/Main/Main_fui.bytes

+ 13 - 8
GameClient/Assets/Editor/Excel/CodeBuilder.cs

@@ -1,13 +1,8 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Data;
+using System.Collections.Generic;
 using System.IO;
 using System.Text;
 using UnityEngine;
 using GFGGame;
-using System.Text.RegularExpressions;
-using static Google.Protobuf.Reflection.GeneratedCodeInfo.Types;
 using OfficeOpenXml;
 
 namespace GFGEditor
@@ -168,7 +163,7 @@ namespace GFGEditor
                     string functionName = string.Format("GetCfgsBy{0}", string.Join("And", groupNames[key]));
                     string cfgsGroupDicName = string.Format("_cfgsGroupDic{0}", index0);
                     groupFunction = groupFunction + HandleGroupFunction("groupKey_" + key, groupNames[key], groupTypes[key], functionName, cfgsGroupDicName, configArrayStr, configArrayName);
-                    strDispose = string.Format("{0}\t\t\t{1}.Clear();", strDispose, cfgsGroupDicName);
+                    strDispose = string.Format("{0}\n\t\t\t{1}.Clear();", strDispose, cfgsGroupDicName);
                     index0++;
                 }
             }
@@ -205,6 +200,16 @@ namespace GFGEditor
             }
             string singleStrs = string.Join("\n", singleStrArry);
 
+            if(string.IsNullOrEmpty(singleStrs))
+            {
+                configArrayStr = configArrayStr.Replace("{SingleHandleBlock}", "");
+            }
+            else
+            {
+                //添加
+                configArrayStr = configArrayStr.Replace("{SingleHandleBlock}", singleStrs);
+            }
+
             List<string> groupStrArry = new List<string>();
             int index1 = 0;
             foreach (string key in groupNames.Keys)
@@ -219,7 +224,7 @@ namespace GFGEditor
             }
             string groupStrs = string.Join("\n", groupStrArry);
 
-            configArrayStr = configArrayStr.Replace("{FunctionAllBlock}", singleStrs + "\n" + groupStrs);
+            configArrayStr = configArrayStr.Replace("{FunctionAllBlock}", groupStrs);
 
             // foreach()
             //名称处理

+ 7 - 0
GameClient/Assets/Editor/Excel/Template/ConfigArray.txt

@@ -9,6 +9,13 @@ namespace GFGGame
 
 {Dispose}
 
+
+        private void HandleCfg({CfgName} cfg)
+        {
+{SingleHandleBlock}
+        }
+
+
 {singleFunction}
 
 {groupFunction}

+ 1 - 0
GameClient/Assets/Editor/Excel/Template/FunctionAll.txt

@@ -1,6 +1,7 @@
 
         private void HandleCfgInAll({CfgName} cfg)
         {
+            HandleCfg(cfg);
 {FunctionAllBlock}
         }
 

+ 1 - 1
GameClient/Assets/Editor/Excel/Template/FunctionGroup.txt

@@ -4,6 +4,6 @@
         {
             var colNames = new string[] { {colNames}};
             var colValues = new string[] { {colValues} };
-            return ConfigUtil.GetCfgs<{CfgName}>("{CfgArrayName}", colNames, colValues, {cfgsGroupDicName});
+            return ConfigUtil.GetCfgs<{CfgName}>("{CfgArrayName}", colNames, colValues, {cfgsGroupDicName}, HandleCfg);
         }
         

+ 2 - 0
GameClient/Assets/Editor/Excel/Template/FunctionSingle.txt

@@ -5,4 +5,6 @@
             var colValues = new string[] { {colValues} };
             return ConfigUtil.GetCfg<{CfgName}>("{CfgArrayName}", colNames, colValues, {cfgsDicName});
         }
+
+
         

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ActivityDay7/UI_ExpProcessItem.cs

@@ -14,6 +14,7 @@ namespace UI.ActivityDay7
         public GTextField m_Num;
         public GTextField m_Score;
         public GImage m_Get;
+        public GGraph m_holderfEff;
         public const string URL = "ui://kupdwln7bhmmi";
         public const string PACKAGE_NAME = "ActivityDay7";
         public const string RES_NAME = "ExpProcessItem";
@@ -68,6 +69,7 @@ namespace UI.ActivityDay7
             m_Num = (GTextField)comp.GetChild("Num");
             m_Score = (GTextField)comp.GetChild("Score");
             m_Get = (GImage)comp.GetChild("Get");
+            m_holderfEff = (GGraph)comp.GetChild("holderfEff");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -78,6 +80,7 @@ namespace UI.ActivityDay7
             m_Num = null;
             m_Score = null;
             m_Get = null;
+            m_holderfEff = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_TaskListItem.cs

@@ -17,6 +17,7 @@ namespace UI.CommonGame
         public UI_Button22 m_ComeBt;
         public UI_Button22 m_GetRewardBt1;
         public GProgressBar m_taskBar;
+        public GGraph m_holderfTaskEff;
         public const string URL = "ui://eg2y0ldplh8v5";
         public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "TaskListItem";
@@ -74,6 +75,7 @@ namespace UI.CommonGame
             m_ComeBt = (UI_Button22)UI_Button22.Create(comp.GetChild("ComeBt"));
             m_GetRewardBt1 = (UI_Button22)UI_Button22.Create(comp.GetChild("GetRewardBt1"));
             m_taskBar = (GProgressBar)comp.GetChild("taskBar");
+            m_holderfTaskEff = (GGraph)comp.GetChild("holderfTaskEff");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -90,6 +92,7 @@ namespace UI.CommonGame
             m_GetRewardBt1.Dispose();
             m_GetRewardBt1 = null;
             m_taskBar = null;
+            m_holderfTaskEff = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ListCardItem.cs

@@ -7,6 +7,7 @@ namespace UI.Main
     public partial class UI_ListCardItem
     {
         public GButton target;
+        public Controller m_starNumType;
         public UI_ComCardMask m_comCardMask;
         public GLoader m_loaBorder;
         public GLoader m_loaMainScore;
@@ -64,6 +65,7 @@ namespace UI.Main
 
         private void Init(GComponent comp)
         {
+            m_starNumType = comp.GetController("starNumType");
             m_comCardMask = (UI_ComCardMask)UI_ComCardMask.Create(comp.GetChild("comCardMask"));
             m_loaBorder = (GLoader)comp.GetChild("loaBorder");
             m_loaMainScore = (GLoader)comp.GetChild("loaMainScore");
@@ -77,6 +79,7 @@ namespace UI.Main
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_starNumType = null;
             m_comCardMask.Dispose();
             m_comCardMask = null;
             m_loaBorder = null;

+ 37 - 2
GameClient/Assets/Game/HotUpdate/Views/ActivityDay7/ActivityDay7View.cs

@@ -21,7 +21,9 @@ namespace GFGGame
 
         //选中的天数index 天数=index+1
         private int onClickDayIndex;
-
+        private List<EffectUI> _effectUIs = new List<EffectUI>();
+        private List<EffectUI> _effectTaskUIs = new List<EffectUI>();
+        
         public override void Dispose()
         {
             if (_ui != null)
@@ -70,6 +72,8 @@ namespace GFGGame
         public override void Hide()
         {
             Timers.inst.Remove(UpdateTime);
+            ClearScoreItemEff();
+            ClearTaskItemEff();
             base.Hide();
         }
 
@@ -166,6 +170,7 @@ namespace GFGGame
 
         private void SetTasks()
         {
+            ClearTaskItemEff();
             var activity7DaysTaskCfg = Activity7DaysTaskCfgArray.Instance.GetCfg(onClickDayIndex + 1);
             var taskIdArr = activity7DaysTaskCfg.taskIdArr;
             //排序根据领取状态
@@ -203,6 +208,10 @@ namespace GFGGame
             {
                 item.m_listTaskReward.itemRenderer = ListTaskRewardItemRender;
             }
+            if (item.m_c1.selectedIndex == 1){
+                EffectUI _effectUI = EffectUIPool.CreateEffectUI(item.m_holderfTaskEff, "ui_Small_parts", "store_button_public");
+                _effectTaskUIs.Add(_effectUI);
+            }
             item.m_listTaskReward.data = TaskDataManager.Instance.GetReward(taskCfg);
             item.m_listTaskReward.numItems = TaskDataManager.Instance.GetReward(taskCfg).Length;
             RedDotController.Instance.SetComRedDot(item.m_GetRewardBt.target, item.m_c1.selectedIndex == 1);
@@ -234,6 +243,7 @@ namespace GFGGame
         //设置积分列表
         private void SetScoreList()
         {
+            ClearScoreItemEff();
             //7日活动配置
             activity7DaysCfgs = Activity7DaysCfgArray.Instance.dataArray;
             var maxCfg = activity7DaysCfgs[activity7DaysCfgs.Length - 1];
@@ -242,6 +252,7 @@ namespace GFGGame
             var pos = _ui.m_StartIndex.position;
             var endX = _ui.m_EndIndex.position.x;
             _ui.m_ExpProcess.max = maxScore;
+            var score = ActivityDay7DataManager.Instance.GetScore();
             //循环设置UI
             foreach (var cfg in activity7DaysCfgs)
             {
@@ -259,6 +270,10 @@ namespace GFGGame
                 item.m_loaIcon.url = string.IsNullOrEmpty(itemCfg.res) ? "" : ResPathUtil.GetIconPath(itemCfg);
                 item.m_Num.text = cfgBonusArr[0][1].ToString();
                 item.m_c1.selectedIndex = cfg.id == maxCfgID ? 1 : 0;
+                //if (item.m_c2.selectedIndex == 0 && score >= cfgScore) { 
+                //    var _effectUI = EffectUIPool.CreateEffectUI(item.m_holderfEff, "ui_Small_parts", "store_NotClaimed_circle");
+                //    _effectUIs.Add(_effectUI);
+                //}
                 item.target.data = cfg;
                 item.target.onClick.Add(OnClickReward);
                 UI_ExpProcess.ProxyEnd();
@@ -266,6 +281,26 @@ namespace GFGGame
             FreshGetStatus();
         }
 
+        public void ClearScoreItemEff()
+        {
+            for (int i = 0; i < _effectUIs.Count; i++)
+            {
+                EffectUIPool.Recycle(_effectUIs[i]);
+                _effectUIs[i] = null;
+            }
+            _effectUIs.Clear();
+        }
+
+        public void ClearTaskItemEff()
+        {
+            for (int i = 0; i < _effectTaskUIs.Count; i++)
+            {
+                EffectUIPool.Recycle(_effectTaskUIs[i]);
+                _effectTaskUIs[i] = null;
+            }
+            _effectTaskUIs.Clear();
+        }
+        
         //设置天数列表
         private void SetDayList()
         {
@@ -286,7 +321,7 @@ namespace GFGGame
                 item.m_c2.selectedIndex = state ? 1 : 0;
                 RedDotController.Instance.SetComRedDot(item.target,
                     ActivityDay7DataManager.Instance.CheckActivityDay7RewardCanGet(cfgID),"",-90);
-                UI_ExpProcessItem.ProxyEnd();   
+                UI_ExpProcessItem.ProxyEnd();
             });
         }
 

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -344,7 +344,7 @@ namespace GFGGame
                 // TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
                 long time = endTime - curTime;
                 string strTime = time > TimeUtil.SECOND_PER_DAY * 100 ? TimeUtil.FormattingTimeTo_DDHHmm(time) : TimeUtil.FormattingTimeTo_HHmmss(time);
-                comBox.m_txtTime.text = string.Format("活动时间:剩余{0}", strTime);
+                comBox.m_txtTime.text = string.Format("概率提升:剩余{0}", strTime);
                 //comBox.m_loaTitle.url = "ui://LuckyBox/zx_title_1";
             }
             else
@@ -476,7 +476,7 @@ namespace GFGGame
 
                 long time = endTime - curTime;
                 string strTime = time > TimeUtil.SECOND_PER_DAY * 100 ? TimeUtil.FormattingTimeTo_DDHHmm(time) : TimeUtil.FormattingTimeTo_HHmmss(time);
-                textField.asTextField.text = string.Format("活动时间:剩余{0}", strTime);
+                textField.asTextField.text = string.Format("概率提升:剩余{0}", strTime);
             }
             else if(LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_2)
             {

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryCardChoose.cs

@@ -198,6 +198,7 @@ namespace GFGGame
             // UI_ComStar comStar = UI_ComStar.Proxy(item.m_comStar);
 
             int starLevelDodge = cardData.star / 5;
+            item.m_starNumType.selectedIndex = cardData.itemCfg.starDescArr.Length - 1;
             for (int i = 0; i < 4; i++)
             {
                 UI_ComDodgeStar dodgeStar = UI_ComDodgeStar.Proxy(item.target.GetChild("dodgeStar" + i));

二进制
GameClient/Assets/ResIn/UI/ActivityDay7/ActivityDay7_fui.bytes


二进制
GameClient/Assets/ResIn/UI/Card/Card_fui.bytes


二进制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0!a.png


二进制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0.png


二进制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1!a.png


二进制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_1.png


二进制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_2!a.png


二进制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_atlas0_2.png


二进制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes


二进制
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes