zhaoyang %!s(int64=3) %!d(string=hai) anos
pai
achega
6d73bd8388

+ 5 - 5
FGUIProject/assets/ClothingShop/ClothingShopUI.xml

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
-  <controller name="c1" pages="0,,2,,3,,4,,5," selected="4">
-    <remark page="2" value="服装店"/>
-    <remark page="3" value="落星商店"/>
-    <remark page="4" value="活动商店"/>
+  <controller name="c1" pages="2,,3,,4,,5," selected="3">
+    <remark page="1" value="服装店"/>
+    <remark page="2" value="落星商店"/>
+    <remark page="3" value="活动商店"/>
   </controller>
   <displayList>
     <loader id="n48_f5bl" name="bg" xy="0,-240" size="1080,2400" url="ui://eg2y0ldpj539i" autoSize="true">
@@ -77,7 +77,7 @@
     </list>
     <loader id="n45_ugdz" name="n45" xy="0,0" size="1080,199" url="ui://e5hnfx8augdz1i" fill="scaleFree"/>
     <component id="n2_hinb" name="valueBar" src="v3541v" fileName="components/ComponentValueBar.xml" pkg="eg2y0ldp" xy="159,107">
-      <gearXY controller="c1" pages="0,2,3,4,5" values="159,90|159,90|159,90|159,107|159,107"/>
+      <gearXY controller="c1" pages="2,3,4,5" values="159,90|159,90|159,107|159,107"/>
     </component>
     <component id="n47_ugdz" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
     <image id="n49_f5bl" name="n49" src="lwri5x" fileName="images/hc_btkuang_1.png" pkg="eg2y0ldp" xy="282,103" group="n51_f5bl"/>

+ 8 - 8
FGUIProject/assets/ClothingShop/components/CompItemInfo.xml

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="412,952">
-  <controller name="c1" pages="0,,1,,2,,6,,7," selected="0">
-    <remark page="2" value="服装店"/>
-    <remark page="3" value="落星商店"/>
-    <remark page="4" value="活动商店"/>
+  <controller name="c1" pages="1,,2,,6,,7," selected="1">
+    <remark page="1" value="服装店"/>
+    <remark page="2" value="落星商店"/>
+    <remark page="3" value="活动商店"/>
   </controller>
   <displayList>
-    <image id="n7_hinb" name="n7" src="hinb3" fileName="images/fzd_diban_1.png" xy="0,0"/>
+    <image id="n7_hinb" name="n7" src="hinb3" fileName="images/fzd_diban_1.png" xy="0,1"/>
     <text id="n8_hinb" name="txtName" xy="62,41" size="164,54" fontSize="40" color="#ffffff" text="衣服名字"/>
     <text id="n30_hinb" name="txtDesc" xy="38,127" size="336,34" fontSize="24" color="#af9574" autoSize="none" autoClearText="true" text="赵钱孙李周吴郑王"/>
     <loader id="n43_hinb" name="rarity" xy="360,23" size="44,94" url="ui://eg2y0ldpd4iw52" autoSize="true"/>
@@ -25,13 +25,13 @@
     <loader id="n47_ugdz" name="iconPrice" xy="102,702" size="34,34" group="n46_hinb" touchable="false" url="ui://eg2y0ldpq08x3" fill="scale">
       <gearDisplay controller="c1" pages="0,1,2"/>
     </loader>
-    <text id="n48_ugdz" name="txtPrice" xy="136,698" size="97,41" group="n46_hinb" fontSize="30" color="#f2efff" autoClearText="true" text="99999">
+    <text id="n48_ugdz" name="txtPrice" xy="136,698" size="96,41" group="n46_hinb" fontSize="30" color="#f2efff" autoClearText="true" text="99999">
       <gearDisplay controller="c1" pages="0,1,2"/>
     </text>
-    <text id="n45_hinb" name="txtBtnBuy" xy="233,690" size="76,49" group="n46_hinb" fontSize="36" color="#fff7e4" strokeColor="#ac904e" strokeSize="2" text="购买">
+    <text id="n45_hinb" name="txtBtnBuy" xy="232,690" size="76,49" group="n46_hinb" fontSize="36" color="#fff7e4" strokeColor="#ac904e" strokeSize="2" text="购买">
       <gearText controller="c1" pages="6,7" values="兑换|兑换" default="购买"/>
     </text>
-    <group id="n46_hinb" name="n46" xy="102,690" size="207,49" advanced="true" layout="hz" excludeInvisibles="true">
+    <group id="n46_hinb" name="n46" xy="102,690" size="206,49" advanced="true" layout="hz" excludeInvisibles="true">
       <relation target="" sidePair="center-center,middle-middle"/>
     </group>
     <list id="n53_ih75" name="listTag" xy="41,490" size="333,130" layout="flow_hz" lineGap="12" colGap="22" defaultItem="ui://eg2y0ldpih7566" autoClearItems="true">

+ 6 - 0
FGUIProject/assets/LuckyBox/components/ComHolder.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="78,78">
+  <displayList>
+    <graph id="n5_tt1q" name="holder" xy="38,38" size="1,1"/>
+  </displayList>
+</component>

+ 0 - 12
FGUIProject/assets/LuckyBox/components/ComStar.xml

@@ -3,17 +3,5 @@
   <controller name="c1" pages="0,,1," selected="0"/>
   <displayList>
     <image id="n4_l5nz" name="imgLine" src="l5nzp" fileName="images/cj_xk_xian.png" xy="36,34" pivot="0,0.5" size="10,12"/>
-    <image id="n3_l5nz" name="n3" src="l5nzo" fileName="images/cj_xk_yd.png" xy="15,15" pivot="0.5,0.5">
-      <gearDisplay controller="c1" pages="0"/>
-    </image>
-    <image id="n2_l5nz" name="n2" src="l5nzn" fileName="images/cj_xk_xx.png" xy="0,0" pivot="0.5,0.5">
-      <gearDisplay controller="c1" pages="1"/>
-    </image>
-    <graph id="n5_tt1q" name="holder" xy="38,38" size="1,1">
-      <gearDisplay controller="c1" pages="0"/>
-    </graph>
-    <graph id="n6_tt1q" name="holder1" xy="38,38" size="1,1">
-      <gearDisplay controller="c1" pages="1"/>
-    </graph>
   </displayList>
 </component>

+ 1 - 0
FGUIProject/assets/LuckyBox/package.xml

@@ -46,6 +46,7 @@
     <image id="o1391h" name="cj_tp_1.jpg" path="/imagesExport/" exported="true" atlas="alone_npot"/>
     <image id="o1391i" name="cj_tp_2.jpg" path="/imagesExport/" exported="true" atlas="alone_npot"/>
     <image id="qi041j" name="cj_zizi_2.png" path="/images/"/>
+    <component id="xg6g1k" name="ComHolder.xml" path="/components/" exported="true"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\LuckyBox" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 71 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComHolder.cs

@@ -0,0 +1,71 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.LuckyBox
+{
+    public partial class UI_ComHolder
+    {
+        public GComponent target;
+        public GGraph m_holder;
+        public const string URL = "ui://drx9d1usxg6g1k";
+        public const string PACKAGE_NAME = "LuckyBox";
+        public const string RES_NAME = "ComHolder";
+        private static UI_ComHolder _proxy;
+
+        public static UI_ComHolder Create(GObject gObject = null)
+        {
+            var ui = new UI_ComHolder();
+            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_ComHolder Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ComHolder();
+            }
+            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_holder = (GGraph)comp.GetChild("holder");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_holder = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

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

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

+ 0 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComStar.cs

@@ -9,8 +9,6 @@ namespace UI.LuckyBox
         public GComponent target;
         public Controller m_c1;
         public GImage m_imgLine;
-        public GGraph m_holder;
-        public GGraph m_holder1;
         public const string URL = "ui://drx9d1usl5nzq";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "ComStar";
@@ -60,15 +58,11 @@ namespace UI.LuckyBox
         {
             m_c1 = comp.GetController("c1");
             m_imgLine = (GImage)comp.GetChild("imgLine");
-            m_holder = (GGraph)comp.GetChild("holder");
-            m_holder1 = (GGraph)comp.GetChild("holder1");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_c1 = null;
             m_imgLine = null;
-            m_holder = null;
-            m_holder1 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 2 - 3
GameClient/Assets/Game/HotUpdate/Views/ClothingShop/ClothingShopView.cs

@@ -161,11 +161,10 @@ namespace GFGGame
             }
             if (_selectedItemId > 0)
             {
-                // BuyItemConteoller.Show(_cfgSelected.itemID, _cfgSelected.costID, INIT_COUNT, _cfgSelected.costNum, _selectedItemCount, null, true, false, MAX_COUNT);
-                ShopDataManager.Instance.BuyItem(_cfgSelected.id, _selectedItemCount, _storeId, _cfgSelected);
 
+                ShopDataManager.Instance.BuyItem(_cfgSelected.id, _selectedItemCount, _storeId, _cfgSelected);
             }
-            // GuideController.TryGuideClothingShopViewBtnBug(_ui.m_compItemInfo.m_btnBuy);
+
         }
 
         protected override void OnHide()

+ 45 - 36
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxStarView.cs

@@ -36,24 +36,22 @@ namespace GFGGame
         private bool isFirst = true;
         public override void Dispose()
         {
-            // for (int i = 0; i < _gameObjects.Count; i++)
-            // {
-            //     SceneController.DestroyObjectFromView(_gameObjects[i]);
-            //     SceneController.DestroyObjectFromView(_gameObjects1[i]);
-            // }
-            ICollection keys0 = dicGameobj.Keys;
-            foreach (int key in keys0)
-            {
-                for (int i = 0; i < dicGameobj[key].Count; i++)
-                {
-                    SceneController.DestroyObjectFromView(dicGameobj[key][i]);
-                    SceneController.DestroyObjectFromView(dicGameobj1[key][i]);
-                }
 
-            }
             base.Dispose();
         }
+        protected override void OnHide()
+        {
+            int index = 0;
+            GObject star = _ui.target.GetChild(string.Format("comStar{0}_{1}_{2}", _ui.m_ctrlBuyType.selectedIndex, _ui.m_ctrlRewardsType.selectedIndex, index));
 
+            // while (star != null && star.visible == true)
+            // {
+            //     UI_ComStar comStar = UI_ComStar.Proxy(star);
+            //     if (comStar.target.numChildren > 1) comStar.target.RemoveChildAt(1);
+            //     if (comStar.target.numChildren > 1) comStar.target.RemoveChildAt(1);
+            //     index++;
+            // }
+        }
         protected override void OnInit()
         {
             base.OnInit();
@@ -63,6 +61,8 @@ namespace GFGGame
 
             _ui.m_btnBack.visible = true;
             _ui.m_btnBack.onClick.Add(OnClickBtnBack);
+
+
         }
         protected override void OnShown()
         {
@@ -77,6 +77,7 @@ namespace GFGGame
             isFirst = true;
             ResetStartView();
         }
+
         private void ResetStartView()
         {
             showGuide = GuideDataManager.GetGuideCountCopy(ConstGuideId.LUCKY_BOX) <= 0;
@@ -93,27 +94,36 @@ namespace GFGGame
                 comStar.m_c1.selectedIndex = 0;
                 comStar.m_imgLine.width = imgLineWidth;
                 comStar.m_imgLine.rotation = 0;
-
-                if (isFirst && (!dicGameobj.ContainsKey(_ui.m_ctrlRewardsType.selectedIndex) || dicGameobj1[_ui.m_ctrlRewardsType.selectedIndex].Count <= index))
+                GComponent gcom;
+                if (comStar.target.numChildren > 1)
                 {
-                    GameObject gameObject = _gameObjects.Count > index ? _gameObjects[index] : null;
-                    GoWrapper wrapper = _wrappers.Count > index ? _wrappers[index] : null;
+                    gcom = comStar.target.GetChildAt(1).asCom;
+                }
+                else
+                {
+                    gcom = UIPackage.CreateObject("LuckyBox", "ComHolder").asCom;
                     string resPath = ResPathUtil.GetViewEffectPath("ui_ck", "ui_ck");
-                    SceneController.AddObjectToView(gameObject, wrapper, comStar.m_holder, resPath, out gameObject, out wrapper);
-                    if (!dicGameobj.ContainsKey(_ui.m_ctrlRewardsType.selectedIndex)) dicGameobj.Add(_ui.m_ctrlRewardsType.selectedIndex, new List<GameObject>());
-                    if (!dicWrappers.ContainsKey(_ui.m_ctrlRewardsType.selectedIndex)) dicWrappers.Add(_ui.m_ctrlRewardsType.selectedIndex, new List<GoWrapper>());
-                    dicGameobj[_ui.m_ctrlRewardsType.selectedIndex].Add(gameObject);
-                    dicWrappers[_ui.m_ctrlRewardsType.selectedIndex].Add(wrapper);
-
-                    GameObject gameObject1 = _gameObjects1.Count > index ? _gameObjects1[index] : null;
-                    GoWrapper wrapper1 = _wrappers1.Count > index ? _wrappers1[index] : null;
+                    SceneController.AddObjectToView(null, null, gcom.GetChild("holder").asGraph, resPath, out GameObject gameObject, out GoWrapper wrapper);
+                }
+                gcom.visible = true;
+                comStar.target.AddChildAt(gcom, 1);
+
+                GComponent gcom1;
+                if (comStar.target.numChildren > 2)
+                {
+                    gcom1 = comStar.target.GetChildAt(2).asCom;
+                }
+                else
+                {
+                    gcom1 = UIPackage.CreateObject("LuckyBox", "ComHolder").asCom;
                     string resPath1 = ResPathUtil.GetViewEffectPath("ui_ck", "ui_ck_dj");
-                    SceneController.AddObjectToView(gameObject1, wrapper1, comStar.m_holder1, resPath1, out gameObject1, out wrapper1);
-                    if (!dicGameobj1.ContainsKey(_ui.m_ctrlRewardsType.selectedIndex)) dicGameobj1.Add(_ui.m_ctrlRewardsType.selectedIndex, new List<GameObject>());
-                    if (!dicWrappers1.ContainsKey(_ui.m_ctrlRewardsType.selectedIndex)) dicWrappers1.Add(_ui.m_ctrlRewardsType.selectedIndex, new List<GoWrapper>());
-                    dicGameobj1[_ui.m_ctrlRewardsType.selectedIndex].Add(gameObject1);
-                    dicWrappers1[_ui.m_ctrlRewardsType.selectedIndex].Add(wrapper1);
+                    SceneController.AddObjectToView(null, null, gcom1.GetChild("holder").asGraph, resPath1, out GameObject gameObject1, out GoWrapper wrapper1);
                 }
+                gcom1.visible = false;
+                comStar.target.AddChildAt(gcom1, 2);
+
+
+
                 star.data = new Vector2(comStar.target.x, comStar.target.y);
                 comStars.Add(star);
 
@@ -155,7 +165,9 @@ namespace GFGGame
                         SetCurComStarTransfrom(comStarPos);
                     }
                     UI_ComStar comStar = UI_ComStar.Proxy(comStars[i]);
-                    comStar.m_c1.selectedIndex = 1;
+                    comStar.target.GetChildAt(2).asCom.visible = true;
+                    comStar.target.GetChildAt(1).asCom.visible = false;
+                    // comStar.m_c1.selectedIndex = 1;
                     curComStar = comStars[i];
                     lastPos = Vector2.right;
 
@@ -234,10 +246,7 @@ namespace GFGGame
 
             ViewManager.Show(ViewName.LUCKY_BOX_VIEW);
         }
-        protected override void OnHide()
-        {
-            base.OnHide();
-        }
+
         protected override void UpdateToCheckGuide(object param)
         {
 

BIN=BIN
GameClient/Assets/ResIn/UI/ClothingShop/ClothingShop_fui.bytes


BIN=BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0!a.png


BIN=BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0.png


BIN=BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes