Răsfoiți Sursa

开服活动剧情关卡修改

huangxiaoyue 1 an în urmă
părinte
comite
cccfdcbedd

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/CommonGame/UI_ComItem.cs

@@ -32,6 +32,7 @@ namespace UI.CommonGame
         public GGroup m_grpGot;
         public GImage m_lock;
         public GImage m_mask;
+        public GTextField m_txtAddition;
         public const string URL = "ui://eg2y0ldpwet2tae";
         public const string PACKAGE_NAME = "CommonGame";
         public const string RES_NAME = "ComItem";
@@ -104,6 +105,7 @@ namespace UI.CommonGame
             m_grpGot = (GGroup)comp.GetChild("grpGot");
             m_lock = (GImage)comp.GetChild("lock");
             m_mask = (GImage)comp.GetChild("mask");
+            m_txtAddition = (GTextField)comp.GetChild("txtAddition");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -132,6 +134,7 @@ namespace UI.CommonGame
             m_grpGot = null;
             m_lock = null;
             m_mask = null;
+            m_txtAddition = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/OpenServerActivity/UI_OpenServerStoryUI.cs

@@ -10,6 +10,7 @@ namespace UI.OpenServerActivity
         public GLoader m_loaBg;
         public GComponent m_valueBar;
         public GButton m_btnBack;
+        public GList m_list;
         public const string URL = "ui://b8ha2mnspll2g";
         public const string PACKAGE_NAME = "OpenServerActivity";
         public const string RES_NAME = "OpenServerStoryUI";
@@ -60,12 +61,14 @@ namespace UI.OpenServerActivity
             m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_valueBar = (GComponent)comp.GetChild("valueBar");
             m_btnBack = (GButton)comp.GetChild("btnBack");
+            m_list = (GList)comp.GetChild("list");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_loaBg = null;
             m_valueBar = null;
             m_btnBack = null;
+            m_list = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 77 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/OpenServerActivity/UI_StoryItem.cs

@@ -0,0 +1,77 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.OpenServerActivity
+{
+    public partial class UI_StoryItem
+    {
+        public GComponent target;
+        public Controller m_storyImageType;
+        public Controller m_posType;
+        public GTextField m_txtTitle;
+        public const string URL = "ui://b8ha2mnsebioi";
+        public const string PACKAGE_NAME = "OpenServerActivity";
+        public const string RES_NAME = "StoryItem";
+        private static UI_StoryItem _proxy;
+
+        public static UI_StoryItem Create(GObject gObject = null)
+        {
+            var ui = new UI_StoryItem();
+            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_StoryItem Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_StoryItem();
+            }
+            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_storyImageType = comp.GetController("storyImageType");
+            m_posType = comp.GetController("posType");
+            m_txtTitle = (GTextField)comp.GetChild("txtTitle");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_storyImageType = null;
+            m_posType = null;
+            m_txtTitle = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/OpenServerActivity/UI_StoryItem.cs.meta

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

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryLevelInfoView.cs

@@ -93,7 +93,7 @@ namespace GFGGame
                 DressUpFightType dressUpFightType = new DressUpFightType();
                 dressUpFightType.levelID = _levelID;
                 dressUpFightType.teaPartID = 0;
-                ViewManager.Show<DressUpFightView>(dressUpFightType);
+                ViewManager.Show<DressUpFightView>(dressUpFightType,true);
                 this.Hide();
             }
             else

+ 1 - 2
GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerActivityView.cs

@@ -102,8 +102,7 @@ namespace GFGGame
         private void OnClickBtnAnswerTianmen()
         {
             //剧情入口
-            PromptController.Instance.ShowFloatTextPrompt("暂未开启");
-            //ViewManager.Show<OpenServerStoryView>(ConstLimitTimeActivityType.ActLimitStlyc);
+            ViewManager.Show<OpenServerStoryView>(ConstLimitTimeActivityType.ActLimitStlyc);
         }
 
         private void OnClickBtnTenShu()

+ 42 - 6
GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerStoryView.cs

@@ -9,9 +9,7 @@ namespace GFGGame
     public class OpenServerStoryView : BaseWindow
     {
         private UI_OpenServerStoryUI _ui;
-        private int itemIndex = 0;
-        private List<StoryLevelCfg> _storyLevelCfgs;
-        private ActivityFightCfg _activityFightCfg;
+        private Dictionary<int,List<StoryLevelCfg>> _storyLevelCfgs = new Dictionary<int, List<StoryLevelCfg>>();
         private int _activityId;
         private int _activityType;
         private ActivityOpenCfg _activityCfg;
@@ -41,6 +39,7 @@ namespace GFGGame
             isReturnView = true;
 
             _ui.m_btnBack.onClick.Add(OnClickBtnBack);
+            _ui.m_list.itemRenderer = RenderListItem;
         }
 
         protected override void AddEventListener()
@@ -54,11 +53,11 @@ namespace GFGGame
             _activityType = (int)this.viewData;
             StudioDataManager.Instance.VIEW_NAME = typeof(OpenServerStoryView).FullName;
             StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _activityType;
-            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("kfhd_sdcy_bg");
+            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("bg_sdcy_gq");
             _activityId = ActivityDataManager.Instance.GetCurOpenActiveByType(_activityType);
             _activityCfg = ActivityOpenCfgArray.Instance.GetCfg(_activityId);
-            _activityFightCfg = ActivityFightCfgArray.Instance.GetCfg(_activityCfg.params3Arr[0]);
-            _storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(_activityFightCfg.type, _activityFightCfg.subType, _activityCfg.params3Arr[0]);
+            _storyLevelCfgs.Clear();
+            _ui.m_list.numItems = _activityCfg.params4Arr.Length;
         }
 
         protected override void OnHide()
@@ -76,5 +75,42 @@ namespace GFGGame
             ViewManager.GoBackFrom(typeof(OpenServerStoryView).FullName);
         }
 
+        private void RenderListItem(int index, GObject obj)
+        {
+            UI_StoryItem item = UI_StoryItem.Proxy(obj);
+
+            var activityStoryCfg = ActivityStoryCfgArray.Instance.GetCfg(_activityCfg.params4Arr[index]);
+
+            item.m_posType.selectedIndex = index % 2;
+
+            if (index > 0 && !InstanceZonesDataManager.CheckLevelPass(_storyLevelCfgs[index - 1][0].id))
+                item.m_storyImageType.selectedIndex = 0;
+            else
+                item.m_storyImageType.selectedIndex = index+1;
+
+            var storyLevelCfg = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(activityStoryCfg.type, activityStoryCfg.subType, _activityCfg.params4Arr[index]);
+            _storyLevelCfgs.Add(index, storyLevelCfg);
+
+            if (item.target.data == null)
+                item.target.onClick.Add(OnClickBtnPlay);
+
+            item.target.data = index;
+            UI_StoryItem.ProxyEnd();
+        }
+
+        private void OnClickBtnPlay(EventContext context)
+        {
+            GObject obj = context.sender as GObject;
+            int index = (int)obj.data;
+            StoryLevelCfg storyLevelCfg = _storyLevelCfgs[index][0];
+            if (index > 0 && !InstanceZonesDataManager.CheckLevelPass(_storyLevelCfgs[index - 1][0].id))
+            {
+                PromptController.Instance.ShowFloatTextPrompt("Ðèͨ¹ØÇ°Öùؿ¨");
+                return;
+            }
+
+            MainStoryDataManager.currentLevelCfgId = storyLevelCfg.id;
+            InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishStudioStoryLevel);
+        }
     }
 }

+ 10 - 0
GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerSuitAdditionView.cs

@@ -108,6 +108,16 @@ namespace GFGGame
             item.m_QualityType.selectedIndex = itemCfg.rarity - 1;
             item.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfg);
             item.m_txtCount.text = "1";
+            float addition = 0;
+            if (ItemDataManager.GetItemNum(itemId) > 0) {
+                addition += itemCfg.addition;
+                addition = addition / 10000 * 100;
+                item.m_txtAddition.text = string.Format("»ñµÃ¼Ó³É:{0}%" , addition);
+                item.m_Lock.selectedIndex = 3;
+            }
+            else
+                item.m_Lock.selectedIndex = 2;
+
             UI_ComItem.ProxyEnd();
         }
 

BIN
GameClient/Assets/ResIn/UI/Card/Card_fui.bytes


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


BIN
GameClient/Assets/ResIn/UI/OpenServerActivity/OpenServerActivity_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/OpenServerActivity/OpenServerActivity_atlas0.png


BIN
GameClient/Assets/ResIn/UI/OpenServerActivity/OpenServerActivity_fui.bytes