zhaoyang 2 tahun lalu
induk
melakukan
f9d3525e6a

+ 4 - 1
FGUIProject/assets/LuckyBox/LuckyBoxActiveUI.xml

@@ -1,13 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
   <displayList>
+    <loader id="n40_mbf1" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" url="ui://drx9d1uso1391h" align="center" vAlign="middle" fill="scale">
+      <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
+    </loader>
     <list id="n23_vek8" name="listBg" xy="0,0" size="1080,1920" layout="row" overflow="scroll" scroll="horizontal" scrollBarFlags="154" defaultItem="ui://drx9d1usnjmn2p">
       <relation target="" sidePair="height-height,center-center,middle-middle"/>
     </list>
     <component id="n3_fka7" name="valueBar" src="v3541v" fileName="components/ComponentValueBar.xml" pkg="eg2y0ldp" xy="0,95" group="n32_vek8">
       <relation target="" sidePair="right-right"/>
     </component>
-    <component id="n6_fka7" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80" group="n32_vek8"/>
+    <component id="n6_fka7" name="btnBack" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="35,80" group="n32_vek8"/>
     <component id="n7_fka7" name="btnHome" src="qp4l60" fileName="components/ButtonHome.xml" pkg="eg2y0ldp" xy="35,220" group="n32_vek8"/>
     <group id="n32_vek8" name="grpTop" xy="0,80" size="1080,236" advanced="true"/>
     <component id="n33_ly9g" name="btnLeft" src="ly9g1e" fileName="components/Button13.xml" pkg="eg2y0ldp" xy="74,960" pivot="0.5,0.5" anchor="true" rotation="180"/>

+ 4 - 1
FGUIProject/assets/LuckyBox/LuckyBoxUI.xml

@@ -1,13 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
   <displayList>
+    <loader id="n40_mbf1" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" url="ui://drx9d1uso1391h" align="center" vAlign="middle" fill="scale">
+      <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
+    </loader>
     <list id="n23_vek8" name="listBg" xy="0,0" size="1080,1920" layout="row" overflow="scroll" scroll="horizontal" scrollBarFlags="154" defaultItem="ui://drx9d1usnjmn2p">
       <relation target="" sidePair="height-height,center-center,middle-middle"/>
     </list>
     <component id="n3_fka7" name="valueBar" src="v3541v" fileName="components/ComponentValueBar.xml" pkg="eg2y0ldp" xy="0,95" group="n32_vek8">
       <relation target="" sidePair="right-right"/>
     </component>
-    <component id="n6_fka7" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80" group="n32_vek8"/>
+    <component id="n6_fka7" name="btnBack" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="35,80" group="n32_vek8"/>
     <component id="n7_fka7" name="btnHome" src="qp4l60" fileName="components/ButtonHome.xml" pkg="eg2y0ldp" xy="35,220" group="n32_vek8"/>
     <group id="n32_vek8" name="grpTop" xy="0,80" size="1080,236" advanced="true"/>
     <component id="n33_ly9g" name="btnLeft" src="ly9g1e" fileName="components/Button13.xml" pkg="eg2y0ldp" xy="74,960" pivot="0.5,0.5" anchor="true" rotation="180"/>

+ 7 - 7
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox_1.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox.cs

@@ -4,7 +4,7 @@ using FairyGUI;
 
 namespace UI.LuckyBox
 {
-    public partial class UI_ComBox_1
+    public partial class UI_ComBox
     {
         public GComponent target;
         public GLoader m_loaBg;
@@ -22,12 +22,12 @@ namespace UI.LuckyBox
         public GTextField m_txtRemainTimes;
         public const string URL = "ui://drx9d1usnjmn2p";
         public const string PACKAGE_NAME = "LuckyBox";
-        public const string RES_NAME = "ComBox_1";
-        private static UI_ComBox_1 _proxy;
+        public const string RES_NAME = "ComBox";
+        private static UI_ComBox _proxy;
 
-        public static UI_ComBox_1 Create(GObject gObject = null)
+        public static UI_ComBox Create(GObject gObject = null)
         {
-            var ui = new UI_ComBox_1();
+            var ui = new UI_ComBox();
             if(gObject == null)
             	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
             else
@@ -36,11 +36,11 @@ namespace UI.LuckyBox
             return ui;
         }
 
-        public static UI_ComBox_1 Proxy(GObject gObject = null)
+        public static UI_ComBox Proxy(GObject gObject = null)
         {
             if(_proxy == null)
             {
-                _proxy = new UI_ComBox_1();
+                _proxy = new UI_ComBox();
             }
             var ui = _proxy;
             if(gObject == null)

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox_1.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: c91e6fc8242bedc4eb4a77673cea57ad
+guid: 4206cf2a88bd2c74b835af8696d3d685
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 92 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_LuckyBoxActiveUI.cs

@@ -0,0 +1,92 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.LuckyBox
+{
+    public partial class UI_LuckyBoxActiveUI
+    {
+        public GComponent target;
+        public GLoader m_loaBg;
+        public GList m_listBg;
+        public GComponent m_valueBar;
+        public GButton m_btnBack;
+        public GButton m_btnHome;
+        public GGroup m_grpTop;
+        public GButton m_btnLeft;
+        public GButton m_btnRight;
+        public const string URL = "ui://drx9d1usmbf1tad";
+        public const string PACKAGE_NAME = "LuckyBox";
+        public const string RES_NAME = "LuckyBoxActiveUI";
+        private static UI_LuckyBoxActiveUI _proxy;
+
+        public static UI_LuckyBoxActiveUI Create(GObject gObject = null)
+        {
+            var ui = new UI_LuckyBoxActiveUI();
+            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_LuckyBoxActiveUI Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_LuckyBoxActiveUI();
+            }
+            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_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_listBg = (GList)comp.GetChild("listBg");
+            m_valueBar = (GComponent)comp.GetChild("valueBar");
+            m_btnBack = (GButton)comp.GetChild("btnBack");
+            m_btnHome = (GButton)comp.GetChild("btnHome");
+            m_grpTop = (GGroup)comp.GetChild("grpTop");
+            m_btnLeft = (GButton)comp.GetChild("btnLeft");
+            m_btnRight = (GButton)comp.GetChild("btnRight");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_loaBg = null;
+            m_listBg = null;
+            m_valueBar = null;
+            m_btnBack = null;
+            m_btnHome = null;
+            m_grpTop = null;
+            m_btnLeft = null;
+            m_btnRight = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_LuckyBoxActiveUI.cs.meta

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

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_LuckyBoxUI.cs

@@ -7,6 +7,7 @@ namespace UI.LuckyBox
     public partial class UI_LuckyBoxUI
     {
         public GComponent target;
+        public GLoader m_loaBg;
         public GList m_listBg;
         public GComponent m_valueBar;
         public GButton m_btnBack;
@@ -61,6 +62,7 @@ namespace UI.LuckyBox
 
         private void Init(GComponent comp)
         {
+            m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_listBg = (GList)comp.GetChild("listBg");
             m_valueBar = (GComponent)comp.GetChild("valueBar");
             m_btnBack = (GButton)comp.GetChild("btnBack");
@@ -71,6 +73,7 @@ namespace UI.LuckyBox
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_loaBg = null;
             m_listBg = null;
             m_valueBar = null;
             m_btnBack = null;

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

@@ -88,7 +88,7 @@ namespace GFGGame
             _ui.m_listBg.itemProvider = GetListItemResource;
             _ui.m_listBg.scrollPane.onScrollEnd.Add(OnListBgScroll);
 
-
+            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("jingzhongh_bg");
         }
         protected override void AddEventListener()
         {
@@ -104,6 +104,15 @@ namespace GFGGame
             LuckyBoxDataManager.Instance.luckyBoxIds.Clear();
             LuckyBoxDataManager.Instance.luckyBoxIds.Add(LuckyBoxDataManager.BOX_ID_2);
             LuckyBoxDataManager.Instance.luckyBoxIds.Add(LuckyBoxDataManager.BOX_ID_3);
+            _activeBoxId = 0;
+            int result = await LuckyBoxSProxy.ReqGetLuckyBoxRotatingInfo();
+            if (result > 0)
+            {
+                RotatingLuckyBoxCfg rotatingLuckyBox = RotatingLuckyBoxCfgArray.Instance.GetCfg(result);
+                _activeBoxId = rotatingLuckyBox.luckyBoxId;
+                LuckyBoxDataManager.Instance.endTime = TimeUtil.GetTimestamp(rotatingLuckyBox.endTime);
+                LuckyBoxDataManager.Instance.luckyBoxIds.Insert(0, _activeBoxId);
+            }
 
             int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[0];
             if (this.viewData != null)
@@ -122,16 +131,7 @@ namespace GFGGame
             if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0) boxId = LuckyBoxDataManager.BOX_ID_2;
             LuckyBoxDataManager.Instance.currentBoxId = boxId;
 
-            _activeBoxId = 0;
-            int result = await LuckyBoxSProxy.ReqGetLuckyBoxRotatingInfo();
-            if (result > 0)
-            {
-                RotatingLuckyBoxCfg rotatingLuckyBox = RotatingLuckyBoxCfgArray.Instance.GetCfg(result);
-                _activeBoxId = rotatingLuckyBox.luckyBoxId;
-                LuckyBoxDataManager.Instance.endTime = TimeUtil.GetTimestamp(rotatingLuckyBox.endTime);
-                LuckyBoxDataManager.Instance.luckyBoxIds.Insert(0, _activeBoxId);
-                Timers.inst.Add(1, 0, CheckTime);
-            }
+            if (_activeBoxId > 0) Timers.inst.Add(1, 0, CheckTime);
 
             _valueBarController.OnShown();
             _valueBarController.Controller(4);
@@ -224,7 +224,7 @@ namespace GFGGame
                 holder.visible = false;
                 if (cfg.suitShowArr.Length > 0)
                 {
-                    //羲和
+                    holder.visible = true;
                     holder.SetXY(cfg.suitShowArr[0][1], cfg.suitShowArr[0][2]);
                     _dressUpObjUIXiHe.ResetSceneObj(100, false, false, null, false);
                     _dressUpObjUIXiHe.dressUpObj.PutOnSuitCfg(cfg.suitShowArr[0][0], true, null, false, false);
@@ -236,9 +236,8 @@ namespace GFGGame
                 holder1.visible = false;
                 if (cfg.suitShowArr.Length > 1)
                 {
-                    //羲和
-                    holder.SetXY(cfg.suitShowArr[1][1], cfg.suitShowArr[1][2]);
-                    //常曦
+                    holder1.visible = true;
+                    holder1.SetXY(cfg.suitShowArr[1][1], cfg.suitShowArr[1][2]);
                     _dressUpObjUIChangXi.ResetSceneObj(100, false, false, null, false);
                     _dressUpObjUIChangXi.dressUpObj.PutOnSuitCfg(cfg.suitShowArr[1][0], true, null, false, false);
                     _dressUpObjUIChangXi.UpdateWrapper(holder1);

TEMPAT SAMPAH
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes