zhaoyang 3 жил өмнө
parent
commit
6135f48914
20 өөрчлөгдсөн 59 нэмэгдсэн , 44 устгасан
  1. 0 0
      FGUIProject/assets/ClothingFoster/ClothingListUI.xml
  2. 0 0
      FGUIProject/assets/ClothingFoster/ClothingUI.xml
  3. 2 2
      FGUIProject/assets/ClothingFoster/package.xml
  4. 1 1
      GameClient/Assets/Game/HotUpdate/Controller/GuideController.cs
  5. 1 1
      GameClient/Assets/Game/HotUpdate/Data/FunctionOpenDataManager.cs
  6. 1 1
      GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs
  7. 7 7
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ClothingListUI.cs
  8. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ClothingListUI.cs.meta
  9. 7 7
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ClothingUI.cs
  10. 1 1
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ClothingUI.cs.meta
  11. 6 11
      GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/ClothingListView.cs
  12. 1 1
      GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/ClothingListView.cs.meta
  13. 17 6
      GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/ClothingView.cs
  14. 1 1
      GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/ClothingView.cs.meta
  15. 1 1
      GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitFosterView.cs
  16. 1 1
      GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachOfItemView.cs
  17. 1 1
      GameClient/Assets/Game/HotUpdate/Views/UIView.cs
  18. 1 1
      GameClient/Assets/Game/HotUpdate/Views/XiuFang/XiuFangView.cs
  19. 9 0
      GameClient/Assets/Game/Launcher/FairyGUI/GFGUIPackage.cs
  20. BIN
      GameClient/Assets/ResIn/UI/ClothingFoster/ClothingFoster_fui.bytes

+ 0 - 0
FGUIProject/assets/ClothingFoster/SuitListUI.xml → FGUIProject/assets/ClothingFoster/ClothingListUI.xml


+ 0 - 0
FGUIProject/assets/ClothingFoster/SuitUI.xml → FGUIProject/assets/ClothingFoster/ClothingUI.xml


+ 2 - 2
FGUIProject/assets/ClothingFoster/package.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packageDescription id="uicwtr5b">
   <resources>
-    <component id="py5g0" name="SuitListUI.xml" path="/" exported="true"/>
+    <component id="py5g0" name="ClothingListUI.xml" path="/" exported="true"/>
     <component id="py5g1" name="Button2.xml" path="/components/"/>
     <image id="py5g2" name="tujian_anniu_1.png" path="/images/" scale="9grid" scale9grid="53,15,106,30"/>
     <image id="py5g3" name="tujian_xzdg.png" path="/images/"/>
@@ -16,7 +16,7 @@
     <image id="py5gc" name="tujian_jdt_2.png" path="/images/" scale="tile"/>
     <image id="py5gd" name="tujian_suoan.png" path="/images/"/>
     <image id="py5ge" name="zhuxian_shuoto.png" path="/images/"/>
-    <component id="py5gf" name="SuitUI.xml" path="/" exported="true"/>
+    <component id="py5gf" name="ClothingUI.xml" path="/" exported="true"/>
     <image id="py5gg" name="sc_bjtu.png" path="/images/images/" atlas="alone_npot"/>
     <image id="py5gh" name="tujian_tzxian.png" path="/images/images/"/>
     <image id="py5gi" name="tujian_tzk_1.png" path="/images/images/"/>

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Controller/GuideController.cs

@@ -57,7 +57,7 @@ namespace GFGGame
             if (cfg.special <= 0) return false;
             if (cfg.key == ConstGuideId.SUIT_LIST_VIEW)
             {
-                return FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(SuitListView).Name, false);
+                return FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(ClothingListView).Name, false);
             }
             return false;
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/FunctionOpenDataManager.cs

@@ -150,7 +150,7 @@ namespace GFGGame
         private bool CheckIsSpecialFunOpen(FunctionOpenCfg cfg, bool showTips = true)
         {
             if (cfg.special <= 0) return true;
-            if (cfg.id == typeof(SuitListView).Name)//服装升级获取第一套【天衣】套装后开启
+            if (cfg.id == typeof(ClothingListView).Name)//服装升级获取第一套【天衣】套装后开启
             {
 
                 if (StorageDataManager.Instance.GetStorageValue(ConstStorageId.FUNCTION_OPEN + cfg.index) == 1) return true;

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs

@@ -42,7 +42,7 @@ namespace GFGGame
                     DecomposeDataManager.Instance.Add(itemID);
                 }
 
-                FunctionOpenCfg functionOpenCfg = FunctionOpenCfgArray.Instance.GetCfg(typeof(SuitListView).Name);
+                FunctionOpenCfg functionOpenCfg = FunctionOpenCfgArray.Instance.GetCfg(typeof(ClothingListView).Name);
                 if (GameGlobal.myUnit != null//游戏角色初始数据不处理
                     && itemCfg.rarity == ConstDressRarity.Rarity_TIANYI
                     && StorageDataManager.Instance.GetStorageValue(ConstStorageId.FUNCTION_OPEN + functionOpenCfg.index) == 0)

+ 7 - 7
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_SuitListUI.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ClothingListUI.cs

@@ -4,7 +4,7 @@ using FairyGUI;
 
 namespace UI.ClothingFoster
 {
-    public partial class UI_SuitListUI
+    public partial class UI_ClothingListUI
     {
         public GComponent target;
         public GLoader m_loaBg;
@@ -16,12 +16,12 @@ namespace UI.ClothingFoster
         public GList m_listSuit;
         public const string URL = "ui://uicwtr5bpy5g0";
         public const string PACKAGE_NAME = "ClothingFoster";
-        public const string RES_NAME = "SuitListUI";
-        private static UI_SuitListUI _proxy;
+        public const string RES_NAME = "ClothingListUI";
+        private static UI_ClothingListUI _proxy;
 
-        public static UI_SuitListUI Create(GObject gObject = null)
+        public static UI_ClothingListUI Create(GObject gObject = null)
         {
-            var ui = new UI_SuitListUI();
+            var ui = new UI_ClothingListUI();
             if(gObject == null)
             	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
             else
@@ -30,11 +30,11 @@ namespace UI.ClothingFoster
             return ui;
         }
 
-        public static UI_SuitListUI Proxy(GObject gObject = null)
+        public static UI_ClothingListUI Proxy(GObject gObject = null)
         {
             if(_proxy == null)
             {
-                _proxy = new UI_SuitListUI();
+                _proxy = new UI_ClothingListUI();
             }
             var ui = _proxy;
             if(gObject == null)

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_SuitUI.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ClothingListUI.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 3b450343ec642d54b84ef7386b603f2d
+guid: bc565d8aae734714ea1e4b20d9686669
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 7 - 7
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_SuitUI.cs → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ClothingUI.cs

@@ -4,7 +4,7 @@ using FairyGUI;
 
 namespace UI.ClothingFoster
 {
-    public partial class UI_SuitUI
+    public partial class UI_ClothingUI
     {
         public GComponent target;
         public Controller m_c1;
@@ -36,12 +36,12 @@ namespace UI.ClothingFoster
         public UI_comFosterAni m_comFosterAni;
         public const string URL = "ui://uicwtr5bpy5gf";
         public const string PACKAGE_NAME = "ClothingFoster";
-        public const string RES_NAME = "SuitUI";
-        private static UI_SuitUI _proxy;
+        public const string RES_NAME = "ClothingUI";
+        private static UI_ClothingUI _proxy;
 
-        public static UI_SuitUI Create(GObject gObject = null)
+        public static UI_ClothingUI Create(GObject gObject = null)
         {
-            var ui = new UI_SuitUI();
+            var ui = new UI_ClothingUI();
             if(gObject == null)
             	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
             else
@@ -50,11 +50,11 @@ namespace UI.ClothingFoster
             return ui;
         }
 
-        public static UI_SuitUI Proxy(GObject gObject = null)
+        public static UI_ClothingUI Proxy(GObject gObject = null)
         {
             if(_proxy == null)
             {
-                _proxy = new UI_SuitUI();
+                _proxy = new UI_ClothingUI();
             }
             var ui = _proxy;
             if(gObject == null)

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitListView.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_ClothingUI.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 92bd63fad90eae24287c6621facc55ee
+guid: 468289b6abc6d6144946700e9e075de5
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 6 - 11
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitListView.cs → GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/ClothingListView.cs

@@ -4,9 +4,9 @@ using FairyGUI;
 using UI.ClothingFoster;
 namespace GFGGame
 {
-    public class SuitListView : BaseWindow
+    public class ClothingListView : BaseWindow
     {
-        private UI_SuitListUI _ui;
+        private UI_ClothingListUI _ui;
         private ValueBarController _valueBarController;
         private int _menuType = ConstSuitGuideTypeId.TYPE_1;
         private int[] _menuTypeDataArray;
@@ -22,16 +22,11 @@ namespace GFGGame
         protected override void OnInit()
         {
             base.OnInit();
-            packageName = UI_SuitListUI.PACKAGE_NAME;
-            _ui = UI_SuitListUI.Create();
+            packageName = UI_ClothingListUI.PACKAGE_NAME;
+            _ui = UI_ClothingListUI.Create();
             this.viewCom = _ui.target;
-            // this.viewCom.Center();
             isfullScreen = true;
 
-            // this.modal = true;
-            // viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
-
-
             _valueBarController = new ValueBarController(_ui.m_valueBar);
 
             _ui.m_listSuit.itemRenderer = ListSuitItemRenderer;
@@ -77,7 +72,7 @@ namespace GFGGame
         private void OnClickBtnBack()
         {
             // this.Hide();
-            ViewManager.GoBackFrom(typeof(SuitListView).FullName);
+            ViewManager.GoBackFrom(typeof(ClothingListView).FullName);
         }
         private void OnClickListTypeItem()
         {
@@ -160,7 +155,7 @@ namespace GFGGame
             {
                 if (haveSuit)
                 {
-                    ViewManager.Show<SuitView>(new object[] { suitId, _suitIds }, new object[] { typeof(SuitListView).Name, this.viewData });
+                    ViewManager.Show<ClothingView>(new object[] { suitId, _suitIds }, new object[] { typeof(ClothingListView).Name, this.viewData });
                 }
                 else
                 {

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitView.cs.meta → GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/ClothingListView.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 1f6b9b9941e918d4a93df3b1bf620c0b
+guid: 45827086fd274f349a17b9aa000ae553
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 17 - 6
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitView.cs → GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/ClothingView.cs

@@ -8,9 +8,9 @@ using ET;
 
 namespace GFGGame
 {
-    public class SuitView : BaseWindow
+    public class ClothingView : BaseWindow
     {
-        private UI_SuitUI _ui;
+        private UI_ClothingUI _ui;
 
         private GameObject _scenePrefab;
         private GameObject _sceneObject;
@@ -32,14 +32,25 @@ namespace GFGGame
         {
 
             base.Dispose();
+            if (_sceneObject != null)
+            {
+                GameObject.Destroy(_sceneObject);
+                _sceneObject = null;
+                _wrapper = null;
+                _scenePrefab = null;
+            }
+            SceneController.DestroyObjectFromView(_gameobject1);
+            _propertyList.Clear();
+            _addPropertyList.Clear();
+
         }
 
 
         protected override void OnInit()
         {
             base.OnInit();
-            packageName = UI_SuitUI.PACKAGE_NAME;
-            _ui = UI_SuitUI.Create();
+            packageName = UI_ClothingUI.PACKAGE_NAME;
+            _ui = UI_ClothingUI.Create();
             this.viewCom = _ui.target;
             // this.viewCom.Center();
             isfullScreen = true;
@@ -113,7 +124,7 @@ namespace GFGGame
         }
         private void OnClickBtnBack()
         {
-            ViewManager.GoBackFrom(typeof(SuitView).FullName);
+            ViewManager.GoBackFrom(typeof(ClothingView).FullName);
         }
         private void OnTabChange()
         {
@@ -362,7 +373,7 @@ namespace GFGGame
         {
             int itemId = (int)(context.data as GComponent).data;
             // GoodsItemTipsController.ShowItemTips(itemId);
-            ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { itemId, new object[] { typeof(SuitView).FullName, this.viewData } });
+            ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { itemId, new object[] { typeof(ClothingView).FullName, this.viewData } });
         }
 
         private async void OnClickBtnRenew()

+ 1 - 1
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingFoster/UI_SuitListUI.cs.meta → GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/ClothingView.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 01f9bddd4e6b8b743873b12d58e3d128
+guid: e4eec032188a13b429c67d81b0c33770
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/ClothingFoster/SuitFosterView.cs

@@ -91,7 +91,7 @@ namespace GFGGame
         private void OnListMaterialsItem(EventContext context)
         {
             int itemId = (int)(context.data as GComponent).data;
-            ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { itemId, new object[] { typeof(SuitView).Name, ( this.viewData as object[])[4]  }
+            ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { itemId, new object[] { typeof(ClothingView).Name, ( this.viewData as object[])[4]  }
     });
         }
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachOfItemView.cs

@@ -269,7 +269,7 @@ namespace GFGGame
                     break;
                 case ConstFunctionId.SUIT_FOSTER:
                     this.Hide();
-                    isJump = ViewManager.Show<SuitListView>(null, _fromeViewDatas);
+                    isJump = ViewManager.Show<ClothingListView>(null, _fromeViewDatas);
                     break;
             }
             if (isJump)

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/UIView.cs

@@ -208,7 +208,7 @@ namespace GFGGame
         void __removeFromStage()
         {
             OnHide();
-            // Dispose();
+            Dispose();
         }
 
     }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/XiuFang/XiuFangView.cs

@@ -77,7 +77,7 @@ namespace GFGGame
         {
             LogServerHelper.SendNodeLog((int)PlayParticipationEnum.FU_ZHUANG_YANG_CHENG, 1);
 
-            ViewManager.Show<SuitListView>(null, new object[] { ViewName.XIU_FANG_VIEW, this.viewData }, false, true);
+            ViewManager.Show<ClothingListView>(null, new object[] { ViewName.XIU_FANG_VIEW, this.viewData }, false, true);
 
             // PromptController.Instance.ShowFloatTextPrompt("暂未开放", MessageType.WARNING);
         }

+ 9 - 0
GameClient/Assets/Game/Launcher/FairyGUI/GFGUIPackage.cs

@@ -10,11 +10,14 @@ namespace GFGGame
     {
         private static Dictionary<string, UIPackage> _packages = new Dictionary<string, UIPackage>();
         private static Dictionary<string, List<Asset>> _assetDic = new Dictionary<string, List<Asset>>();
+        private static Dictionary<string, int> _assetCount = new Dictionary<string, int>();
 
         public static UIPackage AddPackage(string descFilePath)
         {
+            int count = _assetCount.ContainsKey(descFilePath) ? _assetCount[descFilePath] : 0;
             if (_packages.ContainsKey(descFilePath))
             {
+                _assetCount[descFilePath] = count + 1;
                 return _packages[descFilePath];
             }
             var asset = Asset.Load($"{descFilePath}_fui.bytes", typeof(TextAsset));
@@ -31,6 +34,7 @@ namespace GFGGame
                 }
                 return null;
             });
+            _assetCount.Add(descFilePath, count + 1);
             _packages.Add(descFilePath, uiPackage);
             return uiPackage;
         }
@@ -41,6 +45,11 @@ namespace GFGGame
 
             if (_packages.TryGetValue(descFilePath, out package))
             {
+                int count = _assetCount[descFilePath] - 1;
+                _assetCount[descFilePath] = count;
+                if (count > 0) return;
+
+                _assetCount.Remove(descFilePath);
                 _packages.Remove(descFilePath);
                 UIPackage.RemovePackage(package.name);
 

BIN
GameClient/Assets/ResIn/UI/ClothingFoster/ClothingFoster_fui.bytes