Browse Source

工作室

zhaoyang 3 years ago
parent
commit
1f53915ca8

+ 9 - 3
FGUIProject/assets/Studio/StudioEctypeUI.xml

@@ -2,6 +2,9 @@
 <component size="1080,1920">
 <component size="1080,1920">
   <controller name="c1" pages="0,,1," selected="1"/>
   <controller name="c1" pages="0,,1," selected="1"/>
   <displayList>
   <displayList>
+    <image id="n24_fa5e" name="n24" src="vxw539" fileName="bgimg/zhangjie_bg.jpg" pkg="eg2y0ldp" xy="0,-240">
+      <relation target="" sidePair="center-center,middle-middle"/>
+    </image>
     <list id="n17_n3xh" name="listProperty" xy="119,235" size="842,142" layout="row" colGap="40" defaultItem="ui://xz8kxrecn3xhn" align="center">
     <list id="n17_n3xh" name="listProperty" xy="119,235" size="842,142" layout="row" colGap="40" defaultItem="ui://xz8kxrecn3xhn" align="center">
       <gearDisplay controller="c1" pages="1"/>
       <gearDisplay controller="c1" pages="1"/>
       <item/>
       <item/>
@@ -23,8 +26,11 @@
     </list>
     </list>
     <component id="n18_n3xh" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
     <component id="n18_n3xh" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
     <component id="n19_n3xh" name="valueBar" src="v3541v" fileName="components/ComponentValueBar.xml" pkg="eg2y0ldp" xy="159,105"/>
     <component id="n19_n3xh" name="valueBar" src="v3541v" fileName="components/ComponentValueBar.xml" pkg="eg2y0ldp" xy="159,105"/>
-    <text id="n21_n3xh" name="txtNum" xy="76,1791" size="225,42" fontSize="30" text="剩余次数:1/10"/>
-    <text id="n20_n3xh" name="txtTime" xy="78,1846" size="189,42" fontSize="30" text="12小时候刷新"/>
-    <component id="n22_n3xh" name="btnBuy" src="n3xhi" fileName="components/Button12.xml" xy="311,1776"/>
+    <text id="n21_n3xh" name="txtNum" xy="76,1791" size="225,41" group="n23_fa5e" fontSize="30" text="剩余次数:1/10"/>
+    <text id="n20_n3xh" name="txtTime" xy="78,1846" size="189,41" group="n23_fa5e" fontSize="30" text="12小时候刷新"/>
+    <component id="n22_n3xh" name="btnBuy" src="n3xhi" fileName="components/Button12.xml" xy="311,1776" group="n23_fa5e"/>
+    <group id="n23_fa5e" name="n23" xy="76,1776" size="379,111" advanced="true">
+      <relation target="" sidePair="bottom-bottom"/>
+    </group>
   </displayList>
   </displayList>
 </component>
 </component>

+ 3 - 0
FGUIProject/assets/Studio/StudioUI.xml

@@ -1,6 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
 <component size="1080,1920">
   <displayList>
   <displayList>
+    <image id="n6_fa5e" name="n6" src="m9wm8t" fileName="bgimg/gxhd_bjbj.png" pkg="eg2y0ldp" xy="0,-240">
+      <relation target="" sidePair="center-center,middle-middle"/>
+    </image>
     <component id="n1_rbxq" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
     <component id="n1_rbxq" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
     <component id="n2_rbxq" name="comMetal" src="rbxq5" fileName="components/ComEctype.xml" xy="638,681"/>
     <component id="n2_rbxq" name="comMetal" src="rbxq5" fileName="components/ComEctype.xml" xy="638,681"/>
     <component id="n3_rbxq" name="comFabric" src="rbxq5" fileName="components/ComEctype.xml" xy="255,812"/>
     <component id="n3_rbxq" name="comFabric" src="rbxq5" fileName="components/ComEctype.xml" xy="255,812"/>

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -32,6 +32,9 @@ namespace GFGGame
         public const string STORY_FIGHT_QUICKLY_SUCCESS = "STORY_FIGHT_QUICKLY_SUCCESS";
         public const string STORY_FIGHT_QUICKLY_SUCCESS = "STORY_FIGHT_QUICKLY_SUCCESS";
 
 
 
 
+        public const string GET_STUDIO_INFO = "GET_STUDIO_INFO";
+        public const string BUY_STUDIO_PLAY_TIMES = "BUY_STUDIO_PLAY_TIMES";
+        public const string NOTICE_STUDIO_PLAY_TIMES = "NOTICE_STUDIO_PLAY_TIMES";
 
 
     }
     }
 }
 }

+ 59 - 0
GameClient/Assets/Game/HotUpdate/Data/StudioDataManager.cs

@@ -1,11 +1,70 @@
+using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
+using ET;
+using GFGGame;
+
 
 
 namespace GFGGame
 namespace GFGGame
 {
 {
     public class StudioDataManager : SingletonBase<StudioDataManager>
     public class StudioDataManager : SingletonBase<StudioDataManager>
     {
     {
+        private Dictionary<int, StudioData> _StudioInfoById = new Dictionary<int, StudioData>();
+
+        public void Clear()
+        {
+            _StudioInfoById.Clear();
+        }
+
+
+        public void RspStudioInfos(StudioData studioData)
+        {
+            if (!_StudioInfoById.ContainsKey(studioData.ChapterId))
+            {
+                _StudioInfoById.Add(studioData.ChapterId, studioData);
+            }
+            _StudioInfoById[studioData.ChapterId] = studioData;
+        }
+        public void RspBuyStudioPlayTimes(int chapterId, int buyTimes, int totalPlayTimes)
+        {
+            _StudioInfoById[chapterId].BuyTimes = buyTimes;
+            _StudioInfoById[chapterId].TotalPlayTimes = totalPlayTimes;
+
+        }
+        public void NoticeStudioPlayTimes(M2C_NoticeStudioPlayTimes message)
+        {
+            _StudioInfoById[message.ChapterId].PlayTimes = message.PlayTimes;
+        }
 
 
 
 
+        public StudioData GetStudioDataById(int id)
+        {
+            if (_StudioInfoById.ContainsKey(id))
+            {
+                return _StudioInfoById[id];
+            }
+            else
+            {
+                StudioData studioData = new StudioData() { ChapterId = id, BuyTimes = 0, PlayTimes = 0, TotalPlayTimes = StudioCfgArray.Instance.GetCfg(id).num };
+                RspStudioInfos(studioData);
+                return studioData;
+            }
+        }
 
 
+        public void IsCanFight(StoryLevelCfg[] storyLevelCfgs, StoryLevelCfg storyLevelCfg, out bool canFight, out string content)
+        {
+            bool isPass = InstanceZonesDataManager.CheckLevelPass(storyLevelCfg.needStoryLevelId);
+            bool isRoleLv = GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) >= storyLevelCfg.needRoleLv;
+            bool isLastPast = true;
+            int index = Array.IndexOf(storyLevelCfgs, storyLevelCfg);
+            if (index > 0)
+            {
+                isLastPast = InstanceZonesDataManager.CheckLevelPass(storyLevelCfgs[index - 1].needStoryLevelId);
+            }
+            content = "";
+            if (!isRoleLv) content = string.Format("主角等级达到{0}级解锁", storyLevelCfg.order);
+            if (!isLastPast) content = "需通关前置关卡";
+            if (!isPass) content = string.Format("完成主线{0}-{1}解锁", storyLevelCfg.chapterId, storyLevelCfg.order);
+            canFight = isPass && isRoleLv && isLastPast;
+        }
     }
     }
 }
 }

+ 27 - 0
GameClient/Assets/Game/HotUpdate/Data/VO/StudioData.cs

@@ -0,0 +1,27 @@
+using System.Collections.Generic;
+
+namespace GFGGame
+{
+    public class StudioData
+    {
+        /// <summary>
+        /// 副本Id
+        /// </summary>
+        public int ChapterId;
+
+        /// <summary>
+        /// 已购买次数
+        /// </summary>
+        public int BuyTimes;
+
+        /// <summary>
+        /// 已挑战次数
+        /// </summary>
+        public int PlayTimes;
+
+        /// <summary>
+        /// 可挑战次数
+        /// </summary>
+        public int TotalPlayTimes;
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Data/VO/StudioData.cs.meta

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

+ 58 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/StudioProxy.cs

@@ -0,0 +1,58 @@
+using System.Collections.Generic;
+using ET;
+using GFGGame;
+
+namespace ET
+{
+    public class NoticeStudioPlayTimes : AMHandler<M2C_NoticeStudioPlayTimes>
+    {
+        protected override async ETTask Run(Session session, M2C_NoticeStudioPlayTimes message)
+        {
+            StudioDataManager.Instance.NoticeStudioPlayTimes(message);
+            EventAgent.DispatchEvent(ConstMessage.NOTICE_STUDIO_PLAY_TIMES);
+
+            await ETTask.CompletedTask;
+        }
+    }
+}
+namespace GFGGame
+{
+    public class StudioProxy
+    {
+
+        //请求工作室副本数据
+        public static async ETTask ReqStudioInfos()
+        {
+            M2C_GetStudioInfos response = null;
+            response = (M2C_GetStudioInfos)await MessageHelper.SendToServer(new C2M_GetStudioInfos());
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    for (int i = 0; i < response.infos.Count; i++)
+                    {
+                        StudioData studioData = new StudioData { ChapterId = response.infos[i].ChapterId, BuyTimes = response.infos[i].BuyTimes, PlayTimes = response.infos[i].PlayTimes, TotalPlayTimes = response.infos[i].TotalPlayTimes };
+                        StudioDataManager.Instance.RspStudioInfos(studioData);
+                    }
+                    EventAgent.DispatchEvent(ConstMessage.GET_STUDIO_INFO);
+                }
+            }
+        }
+
+        //请求购买副本挑战次数
+        public static async ETTask ReqBuyStudioPlayTimes(int chapterId, int buyType, int buyCount)
+        {
+            M2C_BuyStudioPlayTimes response = null;
+            response = (M2C_BuyStudioPlayTimes)await MessageHelper.SendToServer(new C2M_BuyStudioPlayTimes() { ChapterId = chapterId, BuyType = buyType, BuyCount = buyCount });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    StudioDataManager.Instance.RspBuyStudioPlayTimes(response.ChapterId, response.BuyTimes, response.TotalPlayTimes);
+                    EventAgent.DispatchEvent(ConstMessage.BUY_STUDIO_PLAY_TIMES);
+
+                }
+            }
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/StudioProxy.cs.meta

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

+ 29 - 11
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioBaseView.cs

@@ -1,4 +1,5 @@
 
 
+using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using ET;
 using ET;
 using FairyGUI;
 using FairyGUI;
@@ -13,6 +14,7 @@ namespace GFGGame
 
 
         protected StudioCfg studioCfg;
         protected StudioCfg studioCfg;
         protected StoryLevelCfg[] storyLevelCfgs;
         protected StoryLevelCfg[] storyLevelCfgs;
+        protected StudioData studioData;
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
@@ -34,6 +36,10 @@ namespace GFGGame
             _ui.m_list.SetVirtual();
             _ui.m_list.SetVirtual();
 
 
             _ui.m_btnBuy.onClick.Add(OnCliclBtnBuy);
             _ui.m_btnBuy.onClick.Add(OnCliclBtnBuy);
+
+            EventAgent.AddEventListener(ConstMessage.BUY_STUDIO_PLAY_TIMES, UpdateView);
+            EventAgent.AddEventListener(ConstMessage.NOTICE_STUDIO_PLAY_TIMES, UpdateView);
+
         }
         }
 
 
         protected override void OnShown()
         protected override void OnShown()
@@ -41,6 +47,8 @@ namespace GFGGame
             base.OnShown();
             base.OnShown();
             _valueBarController.OnShown();
             _valueBarController.OnShown();
             UpdateView();
             UpdateView();
+            Timers.inst.Add(1, 0, UpdateShowTime);
+
         }
         }
 
 
         protected override void OnHide()
         protected override void OnHide()
@@ -49,12 +57,12 @@ namespace GFGGame
             _valueBarController.OnHide();
             _valueBarController.OnHide();
             studioCfg = null;
             studioCfg = null;
             storyLevelCfgs = null;
             storyLevelCfgs = null;
+            studioData = null;
             Timers.inst.Remove(UpdateShowTime);
             Timers.inst.Remove(UpdateShowTime);
         }
         }
         private void UpdateView()
         private void UpdateView()
         {
         {
-            _ui.m_txtNum.text = string.Format("剩余次数:{0}/{1}", 1, this.studioCfg.num);
-            Timers.inst.Add(1, 0, UpdateShowTime);
+            _ui.m_txtNum.text = string.Format("剩余次数:{0}/{1}", this.studioData.TotalPlayTimes - this.studioData.PlayTimes, this.studioData.TotalPlayTimes);
         }
         }
         private void UpdateShowTime(object param)
         private void UpdateShowTime(object param)
         {
         {
@@ -63,24 +71,34 @@ namespace GFGGame
         private void ListItemRender(int index, GObject obj)
         private void ListItemRender(int index, GObject obj)
         {
         {
             UI_ListItem item = UI_ListItem.Proxy(obj);
             UI_ListItem item = UI_ListItem.Proxy(obj);
-            // item.m_loaIcon.url=
-            bool isPass = InstanceZonesDataManager.CheckLevelPass(storyLevelCfgs[index].needStoryLevelId);
-            bool isRoleLv = GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) >= storyLevelCfgs[index].needRoleLv;
 
 
+            StudioDataManager.Instance.IsCanFight(storyLevelCfgs, storyLevelCfgs[index], out bool canFight, out string content);
 
 
-            item.m_grpLock.visible = !isPass || !isRoleLv;
-            string title = string.Format("{0}{1}", studioCfg.name, index + 1);
-            if (!isPass) title = string.Format("完成主线{0}-{1}解锁", storyLevelCfgs[index].chapterId, storyLevelCfgs[index].order);
-            if (!isRoleLv) title = string.Format("主角等级达到{}级解锁", storyLevelCfgs[index].order);
-            item.m_txtTitle.text = title;
+            item.m_grpLock.visible = canFight;
+            item.m_txtTitle.text = canFight ? string.Format("{0}{1}", studioCfg.name, index + 1) : content;
             item.target.data = storyLevelCfgs[index];
             item.target.data = storyLevelCfgs[index];
         }
         }
         private void OnCliclListItem(EventContext context)
         private void OnCliclListItem(EventContext context)
         {
         {
             UI_ListItem item = UI_ListItem.Proxy(context.data as GObject);
             UI_ListItem item = UI_ListItem.Proxy(context.data as GObject);
-            StoryLevelCfg storyLevelCfgs = item.target.data as StoryLevelCfg;
+            StoryLevelCfg storyLevelCfg = item.target.data as StoryLevelCfg;
+            StudioDataManager.Instance.IsCanFight(storyLevelCfgs, storyLevelCfg, out bool canFight, out string content);
+            if (!canFight)
+            {
+                PromptController.Instance.ShowFloatTextPrompt(content);
+                return;
+            }
         }
         }
 
 
+        private bool GetCanFight(StoryLevelCfg storyLevelCfg)
+        {
+            bool isPass = InstanceZonesDataManager.CheckLevelPass(storyLevelCfg.needStoryLevelId);
+            bool isRoleLv = GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) >= storyLevelCfg.needRoleLv;
+            return isPass && isRoleLv;
+        }
+
+
+
         private void OnCliclBtnBuy()
         private void OnCliclBtnBuy()
         {
         {
             ViewManager.Show<StudioBuyNumView>(this.studioCfg);
             ViewManager.Show<StudioBuyNumView>(this.studioCfg);

+ 66 - 2
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioBuyNumView.cs

@@ -1,6 +1,7 @@
 
 
 using System.Collections.Generic;
 using System.Collections.Generic;
 using FairyGUI;
 using FairyGUI;
+using UI.CommonGame;
 using UI.Studio;
 using UI.Studio;
 
 
 namespace GFGGame
 namespace GFGGame
@@ -9,6 +10,15 @@ namespace GFGGame
     public class StudioBuyNumView : BaseWindow
     public class StudioBuyNumView : BaseWindow
     {
     {
         private UI_StudioBuyNumUI _ui;
         private UI_StudioBuyNumUI _ui;
+        private int _chapterId;
+        private StudioData _studioData;
+        private StudioCfg _studioCfg;
+
+        private int _index;
+
+        private const int BUY_TYPE_0 = 0;
+        private const int BUY_TYPE_1 = 1;
+
         public override void Dispose()
         public override void Dispose()
         {
         {
             base.Dispose();
             base.Dispose();
@@ -22,11 +32,55 @@ namespace GFGGame
             this.viewCom.Center();
             this.viewCom.Center();
             this.modal = true;
             this.modal = true;
             viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
             viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
+
+            _ui.m_btnExchange.onClick.Add(() => { OnClickBtnBuy(BUY_TYPE_0); });
+            _ui.m_btnExchange.onClick.Add(() => { OnClickBtnBuy(BUY_TYPE_1); });
+
+            EventAgent.AddEventListener(ConstMessage.BUY_STUDIO_PLAY_TIMES, () =>
+            {
+                PromptController.Instance.ShowFloatTextPrompt("购买成功");
+                UpdateView();
+                if (_studioData.BuyTimes == _studioCfg.buyNum)
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("今日购买次数已达上限");
+                    this.Hide();
+                }
+            });
         }
         }
 
 
         protected override void OnShown()
         protected override void OnShown()
         {
         {
             base.OnShown();
             base.OnShown();
+            UpdateView();
+        }
+
+        private void UpdateView()
+        {
+            _chapterId = (int)this.viewData;
+            _studioData = StudioDataManager.Instance.GetStudioDataById(_chapterId);
+            _studioCfg = StudioCfgArray.Instance.GetCfg(_chapterId);
+
+
+            _ui.m_txtNum.text = string.Format("(今天已兑换{0}/{1}次)", _studioData.BuyTimes, _studioCfg.buyNum);
+            ItemCfg cfg1 = ItemCfgArray.Instance.GetCfg(_studioCfg.itemArr[0][0]);
+            UI_ComCostCurrency comCostCurrency = UI_ComCostCurrency.Proxy(_ui.m_comCostItem);
+            comCostCurrency.m_txtNeed.text = _studioCfg.itemArr[0][1].ToString();
+            comCostCurrency.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(cfg1.res);
+
+            _index = 0;
+            int time = _studioData.BuyTimes + 1;
+            for (int i = 0; i < _studioCfg.item2IndexsArr.Length; i++)
+            {
+                if (time == _studioCfg.item2IndexsArr[i] || time > _studioCfg.item2IndexsArr[i] && time < _studioCfg.item2IndexsArr[i + 1])
+                {
+                    _index = i;
+                    break;
+                }
+            }
+            ItemCfg cfg2 = ItemCfgArray.Instance.GetCfg(_studioCfg.item2);
+            UI_ComCostCurrency comCostCurrency2 = UI_ComCostCurrency.Proxy(_ui.m_comCostItem);
+            comCostCurrency2.m_txtNeed.text = _studioCfg.item2NumsArr[_index].ToString();
+            comCostCurrency2.m_loaIcon.url = ResPathUtil.GetCommonGameResPath(cfg2.res);
 
 
         }
         }
 
 
@@ -34,9 +88,19 @@ namespace GFGGame
         {
         {
             base.OnHide();
             base.OnHide();
         }
         }
-
-        private void OnClickBtnBack()
+        private void OnClickBtnBuy(int type)
         {
         {
+            if (_studioData.BuyTimes == _studioCfg.buyNum)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("今日购买次数已达上限");
+                return;
+            }
+            if (type == BUY_TYPE_0 && ItemDataManager.GetItemNum(_studioCfg.itemArr[0][0]) < _studioCfg.itemArr[0][1] || type == BUY_TYPE_1 && ItemDataManager.GetItemNum(_studioCfg.item2) < _studioCfg.item2NumsArr[_index])
+            {
+                PromptController.Instance.ShowFloatTextPrompt("道具不足");
+                return;
+            }
+            StudioProxy.ReqBuyStudioPlayTimes(_chapterId, type, 1).Coroutine();
 
 
         }
         }
     }
     }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFabricView.cs

@@ -25,6 +25,7 @@ namespace GFGGame
         {
         {
             _ui.m_c1.selectedIndex = 0;
             _ui.m_c1.selectedIndex = 0;
             this.studioCfg = StudioCfgArray.Instance.GetCfgs(typeof(StudioFabricView).Name)[0];
             this.studioCfg = StudioCfgArray.Instance.GetCfgs(typeof(StudioFabricView).Name)[0];
+            this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             base.OnShown();
             base.OnShown();

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioMetalView.cs

@@ -27,6 +27,7 @@ namespace GFGGame
             _ui.m_c1.selectedIndex = 0;
             _ui.m_c1.selectedIndex = 0;
 
 
             this.studioCfg = StudioCfgArray.Instance.GetCfgs(typeof(StudioMetalView).Name)[0];
             this.studioCfg = StudioCfgArray.Instance.GetCfgs(typeof(StudioMetalView).Name)[0];
+            this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             base.OnShown();
             base.OnShown();

+ 8 - 2
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioPropertyView.cs

@@ -24,10 +24,15 @@ namespace GFGGame
 
 
         protected override void OnShown()
         protected override void OnShown()
         {
         {
+            StudioCfg[] studioCfgs = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name);
+            this.studioCfg = studioCfgs[0];
+            this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
+            this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
+
             _ui.m_c1.selectedIndex = 1;
             _ui.m_c1.selectedIndex = 1;
-            _ui.m_listProperty.numItems = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name).Length;
+            _ui.m_listProperty.numItems = studioCfgs.Length;
             _ui.m_listProperty.selectedIndex = 0;
             _ui.m_listProperty.selectedIndex = 0;
-            this.studioCfg = StudioCfgArray.Instance.GetCfgs(typeof(StudioPropertyView).Name)[0];
+            _ui.m_list.numItems = this.storyLevelCfgs.Length;
             base.OnShown();
             base.OnShown();
 
 
         }
         }
@@ -53,6 +58,7 @@ namespace GFGGame
             GButton item = (context.data as GObject).asButton;
             GButton item = (context.data as GObject).asButton;
 
 
             this.studioCfg = item.data as StudioCfg;
             this.studioCfg = item.data as StudioCfg;
+            this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
 
 

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioView.cs

@@ -35,6 +35,7 @@ namespace GFGGame
         protected override void OnShown()
         protected override void OnShown()
         {
         {
             base.OnShown();
             base.OnShown();
+            StudioProxy.ReqStudioInfos().Coroutine();
             int isopen = 1;// FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioMetalView).FullName) ? 1 : 0;
             int isopen = 1;// FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioMetalView).FullName) ? 1 : 0;
             _ui.m_comMetal.m_c1.selectedIndex = isopen;
             _ui.m_comMetal.m_c1.selectedIndex = isopen;
             //isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFabricView).FullName) ? 1 : 0; ;
             //isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioFabricView).FullName) ? 1 : 0; ;

BIN
GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes