浏览代码

Merge branch 'master' of https://e.coding.net/shenyou-gfg/gfgclient/client

# Conflicts:
#	GameClient/Assets/Game/CSShare
beiguoxia 3 年之前
父节点
当前提交
93c28e69ed

+ 7 - 2
FGUIProject/assets/ClothingDecompose/ClothingDecomposeUI.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
-  <controller name="c1" pages="0,,1,,2,,3," selected="0"/>
+  <controller name="c1" pages="0,,1,,2,,3," selected="3"/>
   <displayList>
     <graph id="n24_qyr6" name="n24" xy="0,0" size="1080,1920" alpha="0.7" type="rect" lineSize="0" fillColor="#ff000000">
       <relation target="" sidePair="width-width,height-height"/>
@@ -13,7 +13,12 @@
     <component id="n28_cb92" name="valueBar" src="v3541v" fileName="components/ComponentValueBar.xml" pkg="eg2y0ldp" xy="125,90"/>
     <component id="n0_wlc2" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
     <component id="n1_wlc2" name="btnRule" src="wlc21" fileName="components/Button1.xml" xy="975,194"/>
-    <component id="n2_wlc2" name="comBtnTab" src="qyr6v" fileName="components/ComBtnTab.xml" xy="100,343" size="880,63"/>
+    <list id="n29_ez2u" name="listTab" xy="100,343" size="880,63" layout="row" overflow="scroll" scroll="horizontal" scrollBarFlags="2" colGap="12">
+      <item url="ui://h9mv1l71wlc22" icon="ui://h9mv1l71qyr6j" selectedIcon="ui://h9mv1l71qyr6e"/>
+      <item url="ui://h9mv1l71wlc22" icon="ui://h9mv1l71qyr6i" selectedIcon="ui://h9mv1l71qyr6d"/>
+      <item url="ui://h9mv1l71wlc22" icon="ui://h9mv1l71qyr6h" selectedIcon="ui://h9mv1l71qyr6k"/>
+      <item url="ui://h9mv1l71wlc22" icon="ui://h9mv1l71qyr6g" selectedIcon="ui://h9mv1l71qyr6u"/>
+    </list>
     <list id="n10_wlc2" name="list" xy="76,445" size="928,643" layout="flow_hz" selectionMode="multipleSingleClick" overflow="scroll" lineGap="45" colGap="25" defaultItem="ui://h9mv1l71hvn0a" align="center">
       <item/>
       <item/>

+ 1 - 1
FGUIProject/assets/ClothingDecompose/components/ComBtnTab.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1056,63" overflow="scroll" scroll="horizontal">
+<component size="1056,63" overflow="scroll" scroll="horizontal" scrollBarFlags="2">
   <controller name="c1" pages="0,,1,,2,,3," selected="0"/>
   <displayList>
     <component id="n2_wlc2" name="btnRarity0" src="wlc22" fileName="components/Button2.xml" xy="0,0" size="255,63">

+ 12 - 3
FGUIProject/assets/LuckyBox/components/ComListBgItem.xml

@@ -10,15 +10,24 @@
     <graph id="n31_qi04" name="holder1" xy="697,779" size="100,100">
       <relation target="" sidePair="top-middle"/>
     </graph>
-    <text id="n28_vek8" name="txtTime" xy="324,409" size="70,902" fontSize="40" color="#fffbdd" align="center" vAlign="middle" ubb="true" autoSize="none" text="剩余811小时">
-      <relation target="" sidePair="height-height,top-top"/>
-    </text>
     <graph id="n30_qi04" name="holder" xy="312,700" size="100,100">
       <relation target="" sidePair="top-middle"/>
     </graph>
     <image id="n29_qi04" name="imgTitle" src="qi041j" fileName="images/cj_zizi_2.png" xy="92,337">
       <relation target="" sidePair="top-middle"/>
     </image>
+    <text id="n33_ez2u" name="n33" xy="336,727" size="61,108" group="n36_ez2u" fontSize="41" color="#fffbdd" align="center" vAlign="middle" ubb="true" autoSize="height" text="剩余">
+      <relation target="" sidePair="height-height,top-top"/>
+    </text>
+    <text id="n34_ez2u" name="txtTime" xy="326,835" size="80,55" group="n36_ez2u" fontSize="41" color="#fffbdd" align="center" vAlign="middle" ubb="true" text="811">
+      <relation target="" sidePair="height-height,top-top"/>
+    </text>
+    <text id="n35_ez2u" name="txtTimeStr" xy="336,890" size="61,108" group="n36_ez2u" fontSize="41" color="#fffbdd" align="center" vAlign="middle" ubb="true" autoSize="height" text="小时">
+      <relation target="" sidePair="height-height,top-top"/>
+    </text>
+    <group id="n36_ez2u" name="grpTime" xy="326,727" size="80,271" advanced="true" layout="vt" excludeInvisibles="true">
+      <relation target="n29_qi04" sidePair="top-top"/>
+    </group>
   </displayList>
   <customProperty target="loaBg" propertyId="1"/>
 </component>

+ 3 - 4
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingDecompose/UI_ClothingDecomposeUI.cs

@@ -12,7 +12,7 @@ namespace UI.ClothingDecompose
         public GComponent m_valueBar;
         public GButton m_btnBack;
         public GButton m_btnRule;
-        public UI_ComBtnTab m_comBtnTab;
+        public GList m_listTab;
         public GList m_list;
         public GTextField m_txtNone;
         public GTextField m_txtShow;
@@ -73,7 +73,7 @@ namespace UI.ClothingDecompose
             m_valueBar = (GComponent)comp.GetChild("valueBar");
             m_btnBack = (GButton)comp.GetChild("btnBack");
             m_btnRule = (GButton)comp.GetChild("btnRule");
-            m_comBtnTab = (UI_ComBtnTab)UI_ComBtnTab.Create(comp.GetChild("comBtnTab"));
+            m_listTab = (GList)comp.GetChild("listTab");
             m_list = (GList)comp.GetChild("list");
             m_txtNone = (GTextField)comp.GetChild("txtNone");
             m_txtShow = (GTextField)comp.GetChild("txtShow");
@@ -90,8 +90,7 @@ namespace UI.ClothingDecompose
             m_valueBar = null;
             m_btnBack = null;
             m_btnRule = null;
-            m_comBtnTab.Dispose();
-            m_comBtnTab = null;
+            m_listTab = null;
             m_list = null;
             m_txtNone = null;
             m_txtShow = null;

+ 0 - 83
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingDecompose/UI_ComBtnTab.cs

@@ -1,83 +0,0 @@
-/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
-
-using FairyGUI;
-
-namespace UI.ClothingDecompose
-{
-    public partial class UI_ComBtnTab
-    {
-        public GComponent target;
-        public Controller m_c1;
-        public GButton m_btnRarity0;
-        public GButton m_btnRarity1;
-        public GButton m_btnRarity2;
-        public GButton m_btnRarity3;
-        public const string URL = "ui://h9mv1l71qyr6v";
-        public const string PACKAGE_NAME = "ClothingDecompose";
-        public const string RES_NAME = "ComBtnTab";
-        private static UI_ComBtnTab _proxy;
-
-        public static UI_ComBtnTab Create(GObject gObject = null)
-        {
-            var ui = new UI_ComBtnTab();
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static UI_ComBtnTab Proxy(GObject gObject = null)
-        {
-            if(_proxy == null)
-            {
-                _proxy = new UI_ComBtnTab();
-            }
-            var ui = _proxy;
-            if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
-            else
-            	ui.target =  (GComponent)gObject;
-            ui.Init(ui.target);
-            return ui;
-        }
-
-        public static void ProxyEnd()
-        {
-            if (_proxy != null)
-            {
-                _proxy.Dispose();
-            }
-        }
-
-        public static void ClearProxy()
-        {
-            ProxyEnd();
-            _proxy = null;
-        }
-
-        private void Init(GComponent comp)
-        {
-            m_c1 = comp.GetController("c1");
-            m_btnRarity0 = (GButton)comp.GetChild("btnRarity0");
-            m_btnRarity1 = (GButton)comp.GetChild("btnRarity1");
-            m_btnRarity2 = (GButton)comp.GetChild("btnRarity2");
-            m_btnRarity3 = (GButton)comp.GetChild("btnRarity3");
-        }
-        public void Dispose(bool disposeTarget = false)
-        {
-            m_c1 = null;
-            m_btnRarity0 = null;
-            m_btnRarity1 = null;
-            m_btnRarity2 = null;
-            m_btnRarity3 = null;
-            if(disposeTarget && target != null)
-            {
-                target.RemoveFromParent();
-                target.Dispose();
-            }
-            target = null;
-        }
-    }
-}

+ 0 - 11
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingDecompose/UI_ComBtnTab.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 3f51a93ea2a70d24aa8b64c640cbd84e
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 9 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComListBgItem.cs

@@ -10,9 +10,11 @@ namespace UI.LuckyBox
         public GLoader m_loaBg;
         public GLoader m_loaImg;
         public GGraph m_holder1;
-        public GTextField m_txtTime;
         public GGraph m_holder;
         public GImage m_imgTitle;
+        public GTextField m_txtTime;
+        public GTextField m_txtTimeStr;
+        public GGroup m_grpTime;
         public const string URL = "ui://drx9d1usvek811";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "ComListBgItem";
@@ -63,18 +65,22 @@ namespace UI.LuckyBox
             m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_loaImg = (GLoader)comp.GetChild("loaImg");
             m_holder1 = (GGraph)comp.GetChild("holder1");
-            m_txtTime = (GTextField)comp.GetChild("txtTime");
             m_holder = (GGraph)comp.GetChild("holder");
             m_imgTitle = (GImage)comp.GetChild("imgTitle");
+            m_txtTime = (GTextField)comp.GetChild("txtTime");
+            m_txtTimeStr = (GTextField)comp.GetChild("txtTimeStr");
+            m_grpTime = (GGroup)comp.GetChild("grpTime");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_loaBg = null;
             m_loaImg = null;
             m_holder1 = null;
-            m_txtTime = null;
             m_holder = null;
             m_imgTitle = null;
+            m_txtTime = null;
+            m_txtTimeStr = null;
+            m_grpTime = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 33 - 1
GameClient/Assets/Game/HotUpdate/Utils/TimeUtil.cs

@@ -9,7 +9,11 @@ namespace GFGGame
         public static string FormattingTime(int curTime, int endTime)
         {
             int time = endTime - curTime;
-
+            int days = (int)Math.Floor((decimal)time / TimeUtil.SECOND_PER_DAY);
+            if (days >= 1)
+            {
+                return string.Format("{0}天", days);
+            }
             int hours = (int)Math.Floor((decimal)time / TimeUtil.SECOND_PER_HOUR);
             if (hours >= 1)
             {
@@ -22,5 +26,33 @@ namespace GFGGame
             }
             return string.Format("{0}秒", minutes);
         }
+
+        public static void FormattingTime(int curTime, int endTime, out int num, out string str)
+        {
+            int time = endTime - curTime;
+            int days = (int)Math.Floor((decimal)time / TimeUtil.SECOND_PER_DAY);
+            if (days >= 1)
+            {
+                num = days;
+                str = "天";
+                return;
+            }
+            int hours = (int)Math.Floor((decimal)time / TimeUtil.SECOND_PER_HOUR);
+            if (hours >= 1)
+            {
+                num = hours;
+                str = "小时";
+                return;
+            }
+            int minutes = (int)Math.Floor((decimal)time / TimeUtil.SECOND_PER_MUNITE);
+            if (minutes >= 1)
+            {
+                num = minutes;
+                str = "分钟";
+                return;
+            }
+            num = minutes;
+            str = "秒";
+        }
     }
 }

+ 7 - 4
GameClient/Assets/Game/HotUpdate/Views/ClothingDecompose/ClothingDecomposeView.cs

@@ -35,10 +35,12 @@ namespace GFGGame
             _valueBarController = new ValueBarController(_ui.m_valueBar);
 
             _ui.m_btnBack.onClick.Add(OnClickBtnBack);
-            _ui.m_comBtnTab.m_btnRarity0.onClick.Add(() => OnClickBtnRarity(ConstDressRarity.Rarity_FANPIN));
-            _ui.m_comBtnTab.m_btnRarity1.onClick.Add(() => OnClickBtnRarity(ConstDressRarity.Rarity_ZHENXI));
-            _ui.m_comBtnTab.m_btnRarity2.onClick.Add(() => OnClickBtnRarity(ConstDressRarity.Rarity_DIANCANG));
-            _ui.m_comBtnTab.m_btnRarity3.onClick.Add(() => OnClickBtnRarity(ConstDressRarity.Rarity_TIANYI));
+
+            _ui.m_listTab.onClickItem.Add((EventContext context) =>
+            {
+                int index = _ui.m_listTab.GetChildIndex(context.data as GObject);
+                OnClickBtnRarity(index + 1);
+            });
 
             _ui.m_btnSelect.onClick.Add(OnClickBtnSelect);
             _ui.m_btnRule.onClick.Add(OnClickBtnRule);
@@ -57,6 +59,7 @@ namespace GFGGame
         {
             base.OnShown();
             _ui.m_c1.selectedIndex = 0;
+            _ui.m_listTab.selectedIndex = 0;
             _valueBarController.OnShown();
             _valueBarController.Controller(6);
             OnClickBtnRarity(ConstDressRarity.Rarity_FANPIN);

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -17,8 +17,8 @@ namespace GFGGame
         private int[] _currentList2;
         private GameObject _scenePrefab;
         private GameObject _sceneObject;
-        private List<int> _currentList3;
-        private List<int> _currentList4;
+        private List<int> _currentList3 = new List<int>();
+        private List<int> _currentList4 = new List<int>();
         private int _currentMenuType;
         private int _currentSuitId;
         private StoryLevelCfg _levelCfg;

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpView.cs

@@ -22,8 +22,8 @@ namespace GFGGame
         private int[] _currentList2;
         private GameObject _scenePrefab;
         private GameObject _sceneObject;
-        private List<int> _currentList3;
-        private List<int> _currentList4;
+        private List<int> _currentList3 = new List<int>();
+        private List<int> _currentList4 = new List<int>();
         private int _currentMenuType;
         private int _currentSuitId;
         private int _rarityIndex = SORT_BY_HIGH_RARITY;

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

@@ -113,13 +113,15 @@ namespace GFGGame
             }
             int endTime = LuckyBoxDataManager.Instance.endTime;
             int curTime = TimeHelper.ServerNowSecs;
-            UI_ComListBgItem.Proxy(_ui.m_listBg.GetChildAt(0)).m_txtTime.text = string.Format("剩余\n{0}", TimeUtil.FormattingTime(curTime, endTime));
+            TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
+            UI_ComListBgItem.Proxy(_ui.m_listBg.GetChildAt(0)).m_txtTime.text = string.Format("{0}", num);
+            UI_ComListBgItem.Proxy(_ui.m_listBg.GetChildAt(0)).m_txtTimeStr.text = string.Format("{0}", str);
         }
         private void OnListBgScroll()
         {
             UI_ComListBgItem item = UI_ComListBgItem.Proxy(_ui.m_listBg.GetChildAt(_ui.m_c1.selectedIndex));
             LuckyBoxDataManager.Instance.currentBoxId = LuckyBoxDataManager.Instance.luckyBoxIds[_ui.m_c1.selectedIndex];
-            item.m_txtTime.visible = LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
+            item.m_grpTime.visible = LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
             item.m_imgTitle.visible = LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
             item.m_holder.visible = isActiveBoxOpen && LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1;
             item.m_holder1.visible = isActiveBoxOpen && LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1;

+ 4 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightQuicklyView.cs

@@ -117,7 +117,9 @@ namespace GFGGame
                 _ui.m_btnExit.visible = true;
                 UpdateBtnFightTimes();
             }
-            _ui.m_list.scrollPane.ScrollBottom();
+            _ui.m_list.ScrollToView(_index - 1, true);
+
+            //.ScrollBottom();
         }
 
         private void ListItemRender(int index, GObject item)
@@ -144,6 +146,7 @@ namespace GFGGame
                 if (_type == ConstInstanceZonesType.Story && _storyType == ConstInstanceZonesSubType.Normal)
                 {
                     _ui.m_btnFightTimes.visible = true;
+                    times = GameConst.MAX_COUNT_FIGHT_QUICKLY;
                 }
                 _ui.m_txtPowerDesc.visible = _ui.m_btnFightTimes.visible;
 

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs

@@ -118,6 +118,7 @@ namespace GFGGame
             EquipDataCache.cacher.GetCirclePos(pos, _range, out x, out y);
             _ui.m_comClickCircle.target.SetXY(x, y);
             _ui.m_comClickCircle.target.visible = true;
+            _ui.m_comClickCircle.target.onClick.Add(CircleScoreEnd);
 
             // string resPath6 = ResPathUtil.GetViewEffectPath("ui_zhandou", "ui_zd_an_sf");
             if (_index == 0 && GuideDataManager.IsGuideFinish(ConstGuideId.SINGLE_FIGHT) <= 0)
@@ -151,7 +152,7 @@ namespace GFGGame
 
         private void CircleScoreEnd()
         {
-
+            _ui.m_comClickCircle.target.onClick.Remove(CircleScoreEnd);
             int clickState = GetClickState();
             GTweener twener = GTween.GetTween(_gameObject7);
             if (twener != null)

二进制
GameClient/Assets/ResIn/UI/ClothingDecompose/ClothingDecompose_atlas0.png


二进制
GameClient/Assets/ResIn/UI/ClothingDecompose/ClothingDecompose_fui.bytes


二进制
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes