zhaoyang 3 лет назад
Родитель
Сommit
047e3b22f0

+ 1 - 1
GameClient/Assets/Game/CSShare

@@ -1 +1 @@
-Subproject commit 514d94a39a998f98c85f571824c5bf80f8044ef7
+Subproject commit 5f06b58befeba8a42714a75498ca484d4b1d7b38

+ 5 - 1
GameClient/Assets/Game/HotUpdate/Data/StudioDataManager.cs

@@ -10,6 +10,9 @@ namespace GFGGame
     {
         private Dictionary<int, StudioData> _StudioInfoById = new Dictionary<int, StudioData>();
 
+        public int TYPE_SELECT_INDEX = 0;//界面类型0无属性选择,1有属性选择
+        public int PROPERTY_SELECT_INDEX = 0;//属性类型
+
         public void Clear()
         {
             _StudioInfoById.Clear();
@@ -63,7 +66,8 @@ namespace GFGGame
             content = "";
             if (!isRoleLv) content = string.Format("主角等级达到{0}级解锁", storyLevelCfg.order);
             if (!isLastPast) content = "需通关前置关卡";
-            if (!isPass) content = string.Format("完成主线{0}-{1}解锁", storyLevelCfg.chapterId, storyLevelCfg.order);
+            StoryLevelCfg needStoryLevelCfg = StoryLevelCfgArray.Instance.GetCfg(storyLevelCfg.needStoryLevelId);
+            if (!isPass) content = string.Format("完成主线{0}-{1}解锁", needStoryLevelCfg.chapterId, needStoryLevelCfg.order);
             canFight = isPass && isRoleLv && isLastPast;
         }
     }

+ 14 - 1
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioBaseView.cs

@@ -71,9 +71,9 @@ namespace GFGGame
         private void ListItemRender(int index, GObject obj)
         {
             UI_ListItem item = UI_ListItem.Proxy(obj);
-
             StudioDataManager.Instance.IsCanFight(storyLevelCfgs, storyLevelCfgs[index], out bool canFight, out string content);
 
+            item.m_star.selectedIndex = InstanceZonesDataManager.GetStarCountHistory(storyLevelCfgs[index].id);
             item.m_grpLock.visible = canFight;
             item.m_txtTitle.text = canFight ? string.Format("{0}{1}", studioCfg.name, index + 1) : content;
             item.target.data = storyLevelCfgs[index];
@@ -88,6 +88,19 @@ namespace GFGGame
                 PromptController.Instance.ShowFloatTextPrompt(content);
                 return;
             }
+            InstanceZonesController.ShowLevelView(storyLevelCfg.id, OnFinishStoryLevel);
+        }
+        public static void OnFinishStoryLevel(int levelCfgId, bool firstPass, bool success)
+        {
+            if (success)
+            {
+
+
+            }
+            else
+            {
+
+            }
         }
 
         private bool GetCanFight(StoryLevelCfg storyLevelCfg)

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

@@ -23,7 +23,9 @@ namespace GFGGame
 
         protected override void OnShown()
         {
-            _ui.m_c1.selectedIndex = 0;
+            _ui.m_c1.selectedIndex = (int)(this.viewData as object[])[0];
+            StudioDataManager.Instance.TYPE_SELECT_INDEX = _ui.m_c1.selectedIndex;
+            StudioDataManager.Instance.PROPERTY_SELECT_INDEX = 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);

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

@@ -24,7 +24,9 @@ namespace GFGGame
         protected override void OnShown()
         {
 
-            _ui.m_c1.selectedIndex = 0;
+            _ui.m_c1.selectedIndex = (int)(this.viewData as object[])[0];
+            StudioDataManager.Instance.TYPE_SELECT_INDEX = _ui.m_c1.selectedIndex;
+            StudioDataManager.Instance.PROPERTY_SELECT_INDEX = 0;
 
             this.studioCfg = StudioCfgArray.Instance.GetCfgs(typeof(StudioMetalView).Name)[0];
             this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);

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

@@ -29,9 +29,13 @@ namespace GFGGame
             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 = (int)(this.viewData as object[])[0];
+            StudioDataManager.Instance.TYPE_SELECT_INDEX = _ui.m_c1.selectedIndex;
+
             _ui.m_listProperty.numItems = studioCfgs.Length;
-            _ui.m_listProperty.selectedIndex = 0;
+            _ui.m_listProperty.selectedIndex = (int)(this.viewData as object[])[1];
+            StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _ui.m_listProperty.selectedIndex;
+
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
             base.OnShown();
 
@@ -61,6 +65,7 @@ namespace GFGGame
             this.studioData = StudioDataManager.Instance.GetStudioDataById(this.studioCfg.id);
             this.storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgs(this.studioCfg.type, this.studioCfg.subType, this.studioCfg.id);
             _ui.m_list.numItems = this.storyLevelCfgs.Length;
+            StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _ui.m_listProperty.selectedIndex;
 
         }
     }

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

@@ -34,13 +34,13 @@ namespace GFGGame
 
         protected override void OnShown()
         {
-            base.OnShown();
-            StudioProxy.ReqStudioInfos().Coroutine();
-            int isopen = 1;// FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioMetalView).FullName) ? 1 : 0;
+            base.OnShown();//1;//
+            // StudioProxy.ReqStudioInfos().Coroutine();
+            int isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioMetalView).FullName) ? 1 : 0;
             _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; ;
             _ui.m_comFabric.m_c1.selectedIndex = isopen;
-            // isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioPropertyView).FullName) ? 1 : 0;
+            isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioPropertyView).FullName) ? 1 : 0;
             _ui.m_comProperty.m_c1.selectedIndex = isopen;
         }
 
@@ -56,15 +56,15 @@ namespace GFGGame
 
         private void OnClickComMetal()
         {
-            ViewManager.Show<StudioMetalView>(null, new object[] { typeof(StudioView).Name, this.viewData });
+            ViewManager.Show<StudioMetalView>(new object[] { 0, 0 }, new object[] { typeof(StudioView).Name, this.viewData });
         }
         private void OnCliclComFabric()
         {
-            ViewManager.Show<StudioFabricView>(null, new object[] { typeof(StudioView).Name, this.viewData });
+            ViewManager.Show<StudioFabricView>(new object[] { 0, 0 }, new object[] { typeof(StudioView).Name, this.viewData });
         }
         private void OnComProperty()
         {
-            ViewManager.Show<StudioPropertyView>(null, new object[] { typeof(StudioView).Name, this.viewData });
+            ViewManager.Show<StudioPropertyView>(new object[] { 0, 1 }, new object[] { typeof(StudioView).Name, this.viewData });
         }
         private void OnClickComFilling()
         {

+ 10 - 8
GameClient/Assets/Game/HotUpdate/Views/ViewManager.cs

@@ -51,10 +51,11 @@ namespace GFGGame
         /// <param name="hideOthers">�Ƿ�ر�������ͼ</param>
         public static void Show(string viewName, object viewData = null, object[] goBackParams = null, bool hideOthers = false, bool resetGobackParams = false)
         {
-            // if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(viewName.Split('.')[1]))
-            // {
-            //     return;
-            // }
+            string[] names = viewName.Split('.');
+            if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(names[names.Length - 1]))
+            {
+                return;
+            }
             if (hideOthers)
             {
                 HideAllView(viewName);
@@ -116,10 +117,11 @@ namespace GFGGame
         public static bool Show<T>(object viewData = null, object[] goBackParams = null, bool hideOthers = false, bool resetGobackParams = false) where T : class, new()
         {
             string viewName = typeof(T).FullName;
-            // if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(viewName))
-            // {
-            //     return false;
-            // }
+            string[] names = viewName.Split('.');
+            if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(names[names.Length - 1]))
+            {
+                return false;
+            }
             if (hideOthers)
             {
                 HideAllView(viewName);

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