zhaoyang 3 жил өмнө
parent
commit
0c51d12930

+ 3 - 3
FGUIProject/assets/CommonGame/GetSuitItemUI.xml

@@ -11,7 +11,7 @@
       <relation target="" sidePair="center-center,middle-middle"/>
     </graph>
     <image id="n1_tu96" name="n1" src="tu965j" fileName="images/cj_tskuang_1.png" xy="199,1366" group="n6_tu96"/>
-    <text id="n2_tu96" name="txtName" xy="465,1389" size="140,47" group="n6_tu96" fontSize="34" color="#a17472" autoClearText="true" text="套装名称">
+    <text id="n2_tu96" name="txtName" xy="465,1389" size="138,46" group="n6_tu96" fontSize="34" color="#a17472" autoClearText="true" text="套装名称">
       <relation target="" sidePair="center-center"/>
     </text>
     <component id="n4_tu96" name="probar" src="tu965k" fileName="components/ProgressBar1.xml" xy="241,1457" group="n6_tu96">
@@ -26,8 +26,8 @@
     <group id="n6_tu96" name="n6" xy="199,1366" size="672,166" advanced="true">
       <relation target="" sidePair="center-center,middle-middle"/>
     </group>
-    <component id="n9_tu96" name="item" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="395,1523">
-      <relation target="" sidePair="center-center,middle-middle"/>
+    <component id="n9_tu96" name="item" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" xy="540,1687">
+      <relation target="" sidePair="center-center,bottom-bottom"/>
     </component>
   </displayList>
 </component>

+ 13 - 0
FGUIProject/assets/CommonGame/components/Component2.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="250,256">
+  <displayList>
+    <image id="n1_ga16" name="n1" src="9cth8z" fileName="imagesExport/cj_hd_kdi.png" xy="0,6"/>
+    <text id="n2_ga16" name="txtName" xy="95,203" size="60,39" fontSize="28" color="#efe4af" align="center" text="物品">
+      <relation target="n1_ga16" sidePair="center-center"/>
+    </text>
+    <loader id="n3_ga16" name="icon" xy="65,59" size="120,120" align="center" vAlign="middle" fill="scale" shrinkOnly="true"/>
+    <loader id="n4_ga16" name="rarity" xy="192,18" size="42,96" url="ui://eg2y0ldpd4iw52"/>
+    <image id="n5_9cth" name="n5" src="9cth90" fileName="imagesExport/cj_hd_zik.png" xy="1,203"/>
+    <image id="n7_pzq1" name="imgNew" src="pzq19p" fileName="imagesExport/cj_hd_xin.png" xy="19,0" visible="false"/>
+  </displayList>
+</component>

+ 6 - 9
FGUIProject/assets/CommonGame/components/LuckyBoxBonusItem.xml

@@ -1,13 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="290,293">
+<component size="290,293" pivot="0.5,0.5" anchor="true">
   <displayList>
-    <image id="n1_ga16" name="n1" src="9cth8z" fileName="imagesExport/cj_hd_kdi.png" xy="20,21"/>
-    <text id="n2_ga16" name="txtName" xy="115,218" size="60,39" fontSize="28" color="#efe4af" align="center" text="物品">
-      <relation target="n1_ga16" sidePair="center-center"/>
-    </text>
-    <loader id="n3_ga16" name="icon" xy="85,74" size="120,120" align="center" vAlign="middle" fill="scale" shrinkOnly="true"/>
-    <loader id="n4_ga16" name="rarity" xy="212,33" size="42,96" url="ui://eg2y0ldpd4iw52"/>
-    <image id="n5_9cth" name="n5" src="9cth90" fileName="imagesExport/cj_hd_zik.png" xy="21,218"/>
-    <image id="n7_pzq1" name="imgNew" src="pzq19p" fileName="imagesExport/cj_hd_xin.png" xy="39,15" visible="false"/>
+    <component id="n1_ga16" name="comIcon" src="dcrotaa" fileName="components/Component2.xml" xy="145,146" pivot="0.5,0.5" anchor="true"/>
+    <graph id="n8_dcro" name="holder" xy="144,146" size="1,1" touchable="false" type="rect"/>
   </displayList>
+  <transition name="t0">
+    <item time="0" type="Scale" target="n1_ga16" tween="true" startValue="0,0" endValue="1,1" duration="4" ease="Expo.In"/>
+  </transition>
 </component>

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

@@ -182,6 +182,7 @@
     <component id="10nota7" name="Button15.xml" path="/components/" exported="true"/>
     <image id="dmsi1h" name="sc_xtxtxt.png" path="/images/" scale="9grid" scale9grid="12,0,44,2"/>
     <image id="iftfta9" name="sc_tc_kuang_2.png" path="/images/"/>
+    <component id="dcrotaa" name="Component2.xml" path="/components/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\CommonGame" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 12 - 12
FGUIProject/assets/LuckyBox/LuckBoxBonusUI.xml

@@ -4,18 +4,18 @@
     <loader id="n0_fka7" name="bg" xy="0,-240" size="1080,2400" url="ui://eg2y0ldpvxw539">
       <relation target="" sidePair="center-center,middle-middle"/>
     </loader>
-    <component id="n1_ga16" name="item0" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="215,287" group="n15_ga16"/>
-    <component id="n5_ga16" name="item1" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="573,287" group="n15_ga16"/>
-    <component id="n6_ga16" name="item2" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="37,625" group="n15_ga16"/>
-    <component id="n7_ga16" name="item3" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="395,625" group="n15_ga16"/>
-    <component id="n8_ga16" name="item4" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="753,625" group="n15_ga16"/>
-    <component id="n9_ga16" name="item5" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="37,963" group="n15_ga16"/>
-    <component id="n10_ga16" name="item6" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="395,963" group="n15_ga16"/>
-    <component id="n11_ga16" name="item7" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="753,963" group="n15_ga16"/>
-    <component id="n12_ga16" name="item8" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="215,1301" group="n15_ga16"/>
-    <component id="n13_ga16" name="item9" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="573,1301" group="n15_ga16"/>
-    <component id="n14_ga16" name="itemOne" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="395,813" group="n15_ga16"/>
-    <group id="n15_ga16" name="n15" xy="37,287" size="1006,1307" advanced="true">
+    <component id="n1_ga16" name="item0" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="360,452" group="n15_ga16"/>
+    <component id="n5_ga16" name="item1" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="718,452" group="n15_ga16"/>
+    <component id="n6_ga16" name="item2" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="182,790" group="n15_ga16"/>
+    <component id="n7_ga16" name="item3" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="540,790" group="n15_ga16"/>
+    <component id="n8_ga16" name="item4" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="898,790" group="n15_ga16"/>
+    <component id="n9_ga16" name="item5" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="182,1128" group="n15_ga16"/>
+    <component id="n10_ga16" name="item6" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="540,1128" group="n15_ga16"/>
+    <component id="n11_ga16" name="item7" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="898,1128" group="n15_ga16"/>
+    <component id="n12_ga16" name="item8" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="360,1466" group="n15_ga16"/>
+    <component id="n13_ga16" name="item9" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="718,1466" group="n15_ga16"/>
+    <component id="n14_ga16" name="itemOne" src="ga16g" fileName="components/LuckyBoxBonusItem.xml" pkg="eg2y0ldp" xy="540,978" group="n15_ga16"/>
+    <group id="n15_ga16" name="n15" xy="37,306" size="1006,1307" advanced="true">
       <relation target="" sidePair="center-center,middle-middle"/>
     </group>
   </displayList>

+ 80 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Component2.cs

@@ -0,0 +1,80 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.CommonGame
+{
+    public partial class UI_Component2
+    {
+        public GComponent target;
+        public GTextField m_txtName;
+        public GLoader m_icon;
+        public GLoader m_rarity;
+        public GImage m_imgNew;
+        public const string URL = "ui://eg2y0ldpdcrotaa";
+        public const string PACKAGE_NAME = "CommonGame";
+        public const string RES_NAME = "Component2";
+        private static UI_Component2 _proxy;
+
+        public static UI_Component2 Create(GObject gObject = null)
+        {
+            var ui = new UI_Component2();
+            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_Component2 Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_Component2();
+            }
+            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_txtName = (GTextField)comp.GetChild("txtName");
+            m_icon = (GLoader)comp.GetChild("icon");
+            m_rarity = (GLoader)comp.GetChild("rarity");
+            m_imgNew = (GImage)comp.GetChild("imgNew");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_txtName = null;
+            m_icon = null;
+            m_rarity = null;
+            m_imgNew = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_Component2.cs.meta

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

+ 10 - 12
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_LuckyBoxBonusItem.cs

@@ -7,10 +7,9 @@ namespace UI.CommonGame
     public partial class UI_LuckyBoxBonusItem
     {
         public GComponent target;
-        public GTextField m_txtName;
-        public GLoader m_icon;
-        public GLoader m_rarity;
-        public GImage m_imgNew;
+        public UI_Component2 m_comIcon;
+        public GGraph m_holder;
+        public Transition m_t0;
         public const string URL = "ui://eg2y0ldpga16g";
         public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "LuckyBoxBonusItem";
@@ -58,17 +57,16 @@ namespace UI.CommonGame
 
         private void Init(GComponent comp)
         {
-            m_txtName = (GTextField)comp.GetChild("txtName");
-            m_icon = (GLoader)comp.GetChild("icon");
-            m_rarity = (GLoader)comp.GetChild("rarity");
-            m_imgNew = (GImage)comp.GetChild("imgNew");
+            m_comIcon = (UI_Component2)UI_Component2.Create(comp.GetChild("comIcon"));
+            m_holder = (GGraph)comp.GetChild("holder");
+            m_t0 = comp.GetTransition("t0");
         }
         public void Dispose(bool disposeTarget = false)
         {
-            m_txtName = null;
-            m_icon = null;
-            m_rarity = null;
-            m_imgNew = null;
+            m_comIcon.Dispose();
+            m_comIcon = null;
+            m_holder = null;
+            m_t0 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/CommonGame/GetSuitItemVIew.cs

@@ -85,10 +85,10 @@ namespace GFGGame
         {
             UI_LuckyBoxBonusItem itemUI = _ui.m_item;
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemdId);
-            itemUI.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
+            itemUI.m_comIcon.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
             string itemName = itemCfg.name;
-            itemUI.m_txtName.text = itemName;
-            RarityIconController.UpdateRarityIcon(itemUI.m_rarity, itemdId, false);
+            itemUI.m_comIcon.m_txtName.text = itemName;
+            RarityIconController.UpdateRarityIcon(itemUI.m_comIcon.m_rarity, itemdId, false);
             itemUI.target.data = itemdId;
             itemUI.target.onClick.Clear();
             itemUI.target.onClick.Add(OnClickItemUI);

+ 32 - 5
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusView.cs

@@ -10,9 +10,21 @@ namespace GFGGame
     {
         private UI_LuckBoxBonusUI _ui;
 
+        private List<GameObject> _effects = new List<GameObject>();
+        private List<GoWrapper> _wrappers = new List<GoWrapper>();
+
+        private GameObject _effect = new GameObject();
+        private GoWrapper _wrapper = new GoWrapper();
         public override void Dispose()
         {
             base.Dispose();
+            for (int i = 0; i < _effects.Count; i++)
+            {
+                SceneController.DestroyObjectFromView(_effects[i]);
+
+            }
+            SceneController.DestroyObjectFromView(_effect);
+
         }
 
         protected override void OnInit()
@@ -26,6 +38,18 @@ namespace GFGGame
             InitAllItem();
             _ui.m_bg.touchable = false;
             _ui.m_bg.onClick.Add(OnClickBg);
+
+            string resPath = ResPathUtil.GetViewEffectPath("ui_ck", "ui_ck_zl");
+            for (int i = 0; i < 10; i++)
+            {
+                GameObject gameObject0;
+                GoWrapper wrapper0;
+                GGraph holder = _ui.target.GetChild("item" + i).asCom.GetChild("holder").asGraph;
+                SceneController.AddObjectToView(null, null, holder, resPath, out gameObject0, out wrapper0);
+                _effects.Add(gameObject0);
+            }
+            SceneController.AddObjectToView(_effect, _wrapper, _ui.m_itemOne.GetChild("holder").asGraph, resPath, out _effect, out _wrapper);
+
         }
 
         protected override void OnShown()
@@ -79,7 +103,7 @@ namespace GFGGame
                 {
                     UI_LuckyBoxBonusItem itemUI = UI_LuckyBoxBonusItem.Proxy(itemObject);
                     UpdateItem(itemUI, itemData);
-                    Timers.inst.Add(0.1f * i, 1, (object param) =>
+                    Timers.inst.Add(0.3f * i, 1, (object param) =>
                     {
                         itemObject.visible = true;
                         if ((int)param == 9)
@@ -128,16 +152,19 @@ namespace GFGGame
         private void UpdateItem(UI_LuckyBoxBonusItem itemUI, ItemData itemData)
         {
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemData.id);
-            itemUI.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
-            itemUI.m_imgNew.visible = ItemDataManager.GetItemNum(itemData.id) == 1 ? true : false;
+            itemUI.m_comIcon.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
+            itemUI.m_comIcon.m_imgNew.visible = ItemDataManager.GetItemNum(itemData.id) == 1 ? true : false;
             string itemName = itemCfg.name;
             if (itemData.num > 1)
             {
                 itemName += "x" + itemData.num;
             }
-            itemUI.m_txtName.text = itemName;
-            RarityIconController.UpdateRarityIcon(itemUI.m_rarity, itemData.id, false);
+            itemUI.m_comIcon.m_txtName.text = itemName;
+            RarityIconController.UpdateRarityIcon(itemUI.m_comIcon.m_rarity, itemData.id, false);
             itemUI.target.data = itemData.id;
+            itemUI.m_comIcon.target.SetScale(0, 0);
+            itemUI.m_t0.Play();
+            // GTween.To(0, 1, 0.2f).SetTarget(itemUI).OnUpdate((GTweener t) => { itemUI.target.SetScale(t.value.x, t.value.x); });
         }
 
         private void InitAllItem()

+ 1 - 16
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -26,25 +26,10 @@ namespace GFGGame
         private GButton _btnStore;
         private GButton _btnTuJian;
 
-        private GameObject _effectObj0;
-        private GoWrapper _wrapper0;
-        private GameObject _effectObj1;
-        private GoWrapper _wrapper1;
-        private GameObject _effectObj2;
-        private GoWrapper _wrapper2;
-        private GameObject _effectObj3;
-        private GoWrapper _wrapper3;
+
         private GameObject _effectObj4;
         private GoWrapper _wrapper4;
 
-        private GameObject _effectObj0_1;
-        private GoWrapper _wrapper0_1;
-        private GameObject _effectObj1_1;
-        private GoWrapper _wrapper1_1;
-        private GameObject _effectObj2_1;
-        private GoWrapper _wrapper2_1;
-        private GameObject _effectObj3_1;
-        private GoWrapper _wrapper3_1;
         private GameObject _effectObj4_1;
         private GoWrapper _wrapper4_1;
 

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


BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes


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