Browse Source

任务跳转

zhaoyang 3 years ago
parent
commit
33121fe566

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/DailyTask/DailyTaskView.cs

@@ -70,8 +70,9 @@ namespace GFGGame
         }
         private void OnBtnGoClick(EventContext context)
         {
+            this.Hide();
             GObject btnGo = context.sender as GObject;
-            ViewManager.Show(btnGo.data.ToString(), null, new object[] { typeof(DailyTaskView).Name, this.viewData });
+            ViewManager.Show(string.Format("GFGGame.{0}", btnGo.data), null, new object[] { typeof(DailyTaskView).Name, this.viewData });
         }
         private void ListRewardItemRender(int index, GObject obj)
         {

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

@@ -23,7 +23,7 @@ namespace GFGGame
 
         protected override void OnShown()
         {
-            _ui.m_c1.selectedIndex = (int)(this.viewData as object[])[0];
+            _ui.m_c1.selectedIndex = this.viewData == null ? 0 : (int)(this.viewData as object[])[0];
             StudioDataManager.Instance.TYPE_SELECT_INDEX = _ui.m_c1.selectedIndex;
             StudioDataManager.Instance.PROPERTY_SELECT_INDEX = 0;
             StudioDataManager.Instance.VIEW_NAME = typeof(StudioFabricView).Name;

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

@@ -24,7 +24,7 @@ namespace GFGGame
         protected override void OnShown()
         {
 
-            _ui.m_c1.selectedIndex = (int)(this.viewData as object[])[0];
+            _ui.m_c1.selectedIndex = this.viewData == null ? 0 : (int)(this.viewData as object[])[0];
             StudioDataManager.Instance.TYPE_SELECT_INDEX = _ui.m_c1.selectedIndex;
             StudioDataManager.Instance.PROPERTY_SELECT_INDEX = 0;
             StudioDataManager.Instance.VIEW_NAME = typeof(StudioMetalView).Name;

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

@@ -28,8 +28,8 @@ namespace GFGGame
         protected override void OnShown()
         {
             firstOpenProperty = -1;
-            _typeSelectIndex = (int)(this.viewData as object[])[0];
-            _propertySelectIndex = (int)(this.viewData as object[])[1];
+            _typeSelectIndex = this.viewData == null ? 1 : (int)(this.viewData as object[])[0];
+            _propertySelectIndex = this.viewData == null ? 0 : (int)(this.viewData as object[])[1];
             _ui.m_c1.selectedIndex = _typeSelectIndex;
 
             StudioDataManager.Instance.VIEW_NAME = typeof(StudioPropertyView).Name;

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

@@ -41,10 +41,7 @@ namespace GFGGame
             isopen = FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(StudioPropertyView).FullName, false) ? 1 : 0;
             _ui.m_comProperty.m_c1.selectedIndex = isopen;
             var dataArray = FieldCfgArray.Instance.dataArray;
-            foreach (var cfg in dataArray)
-            {
-                Debug.Log("zoya:" + StoryLevelCfgArray.Instance.GetCfgs(cfg.type, cfg.subType, cfg.id).Count);
-            }
+
         }
 
         protected override void OnHide()