فهرست منبع

开服活动部分ui

huangxiaoyue 1 سال پیش
والد
کامیت
e58c7a2187
20فایلهای تغییر یافته به همراه183 افزوده شده و 94 حذف شده
  1. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/OpenServerActivity/UI_OpenServerFightUI.cs
  2. 0 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/OpenServerActivity/UI_OpenServerStoryUI.cs
  3. 1 2
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxActivityView.cs
  4. 2 3
      GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerActivityView.cs
  5. 166 0
      GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerFightView.cs
  6. 11 0
      GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerFightView.cs.meta
  7. 0 86
      GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerStoryView.cs
  8. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes
  9. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0!a.png
  10. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0.png
  11. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_1!a.png
  12. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_1.png
  13. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_3!a.png
  14. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_3.png
  15. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_6!a.png
  16. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_6.png
  17. BIN
      GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes
  18. BIN
      GameClient/Assets/ResIn/UI/OpenServerActivity/OpenServerActivity_atlas0!a.png
  19. BIN
      GameClient/Assets/ResIn/UI/OpenServerActivity/OpenServerActivity_atlas0.png
  20. BIN
      GameClient/Assets/ResIn/UI/OpenServerActivity/OpenServerActivity_fui.bytes

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/OpenServerActivity/UI_OpenServerFightUI.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://b8ha2mnspll2h";
         public const string PACKAGE_NAME = "OpenServerActivity";
         public const string RES_NAME = "OpenServerFightUI";
@@ -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();

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

@@ -10,7 +10,6 @@ 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";
@@ -61,14 +60,12 @@ 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();

+ 1 - 2
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxActivityView.cs

@@ -120,13 +120,12 @@ namespace GFGGame
 
         private void UpdateListItemData()
         {
-
             UI_ComBox comBox = UI_ComBox.Proxy(_ui.m_comBox.target);
 
             LuckyBoxDataManager.Instance.InitData(_luckyBoxCfg.id);
             //comBox.m_comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(_luckyBoxCfg.resArr[0]);
-            comBox.m_btnPreview.m_c1.selectedIndex = 1;
 
+            comBox.m_btnPreview.m_c1.selectedIndex = 1;
 
             comBox.m_comCostOne.m_txtCost.text = _luckyBoxCfg.costNum.ToString();
             comBox.m_comCostOne.m_loaCost.url = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(_luckyBoxCfg.costID).res);

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

@@ -96,14 +96,13 @@ namespace GFGGame
         private void OnClickBtnMingTong()
         {
             //副本入口
-            ViewManager.Show<OpenServerStoryView>(ConstLimitTimeActivityType.ActLimitStlyc);
+            ViewManager.Show<OpenServerFightView>(ConstLimitTimeActivityType.ActLimitStlyc);
         }
 
         private void OnClickBtnAnswerTianmen()
         {
             //剧情入口
-            PromptController.Instance.ShowFloatTextPrompt("暂未开启");
-            //ViewManager.Show<ActivityThemeLuckyBoxView>(null, true);
+            ViewManager.Show<OpenServerStoryView>(ConstLimitTimeActivityType.ActLimitStlyc);
         }
 
         private void OnClickBtnTenShu()

+ 166 - 0
GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerFightView.cs

@@ -0,0 +1,166 @@
+using UnityEngine;
+using FairyGUI;
+using UI.OpenServerActivity;
+using UI.CommonGame;
+using System.Collections.Generic;
+
+namespace GFGGame
+{
+    public class OpenServerFightView : BaseWindow
+    {
+        private UI_OpenServerFightUI _ui;
+        private int itemIndex = 0;
+        private List<StoryLevelCfg> _storyLevelCfgs;
+        private ActivityFightCfg _activityFightCfg;
+        private int _activityId;
+        private int _activityType;
+        private ActivityOpenCfg _activityCfg;
+
+        public override void Dispose()
+        {
+            if (_ui != null)
+            {
+                _ui.Dispose();
+                _ui = null;
+            }
+            base.Dispose();
+        }
+
+        protected override void Init()
+        {
+            base.Init();
+        }
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+            packageName = UI_OpenServerFightUI.PACKAGE_NAME;
+            _ui = UI_OpenServerFightUI.Create();
+            viewCom = _ui.target;
+            isfullScreen = true;
+            isReturnView = true;
+            _ui.m_list.itemRenderer = RenderListItem;
+
+            _ui.m_btnBack.onClick.Add(OnClickBtnBack);
+        }
+
+        protected override void AddEventListener()
+        {
+            base.AddEventListener();
+        }
+
+        protected override void OnShown()
+        {
+            base.OnShown();
+            _activityType = (int)this.viewData;
+            StudioDataManager.Instance.VIEW_NAME = typeof(OpenServerFightView).FullName;
+            StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _activityType;
+            _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]);
+            _ui.m_list.numItems = _storyLevelCfgs.Count;
+            UpdateItem();
+        }
+
+        protected override void OnHide()
+        {
+            base.OnHide();
+        }
+
+        protected override void RemoveEventListener()
+        {
+            base.RemoveEventListener();
+        }
+
+        private void OnClickBtnBack()
+        {
+            ViewManager.GoBackFrom(typeof(OpenServerFightView).FullName);
+        }
+
+        private void RenderListItem(int index, GObject obj)
+        {
+            // int _index = _storyLevelCfgs.Count - index - 1;
+            UI_ListLevelItem item = UI_ListLevelItem.Proxy(obj);
+            //item.m_c1.selectedIndex = index % 2 == 0 ? 0 : 1;
+            item.m_txtName.text = _storyLevelCfgs[index].name;
+            bool isFight = string.IsNullOrEmpty(_storyLevelCfgs[index].storyStartID);
+            string resBg = isFight ? "cyjd_di_1" : "cyjd_di_2";
+            //item.m_loaBg.url = string.Format("ui://Studio/{0}", resBg);
+
+            if (isFight)
+            {
+                //item.m_loaBg.url = "ui://Studio/cyjd_di_1";
+                item.m_loaIcon.visible = false;
+                item.m_loaItem.visible = true;
+                StoryFightCfg storyFightCfg = StoryFightCfgArray.Instance.GetCfg(_storyLevelCfgs[index].fightID);
+                int itemId = storyFightCfg.bonusBaseArr[0][0];
+                ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
+                item.m_loaItem.url = ResPathUtil.GetIconPath(itemCfg);
+                if (item.m_loaItem.data == null)
+                {
+                    item.m_loaItem.onClick.Add(OnLoaItemClick);
+                }
+                item.m_loaItem.data = index;
+            }
+            else
+            {
+                //item.m_loaBg.url = "ui://Studio/cyjd_di_2";
+                item.m_loaItem.visible = false;
+                item.m_loaIcon.visible = true;
+                item.m_loaIcon.url = string.Format("ui://Studio/{0}", _activityFightCfg.res);
+            }
+            item.m_grpLock.visible = index > 0 && !InstanceZonesDataManager.CheckLevelPass(_storyLevelCfgs[index - 1].id);
+            item.m_comFlower.m_c1.selectedIndex = InstanceZonesDataManager.GetStarCountHistory(_storyLevelCfgs[index].id);
+            if (item.m_loaBg.data == null)
+            {
+                item.m_loaBg.onClick.Add(OnListItemClick);
+            }
+            item.m_loaBg.data = index;
+            UI_ListLevelItem.ProxyEnd();
+        }
+
+        private void OnListItemClick(EventContext context)
+        {
+            GObject obj = context.sender as GObject;
+            int index = (int)obj.data;
+            StoryLevelCfg storyLevelCfg = _storyLevelCfgs[index];
+            if (index > 0 && !InstanceZonesDataManager.CheckLevelPass(_storyLevelCfgs[index - 1].id))
+            {
+                PromptController.Instance.ShowFloatTextPrompt("Ðèͨ¹ØÇ°Öùؿ¨");
+                return;
+            }
+            MainStoryDataManager.currentLevelCfgId = storyLevelCfg.id;
+            InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishStudioStoryLevel);
+        }
+
+        private void OnLoaItemClick(EventContext context)
+        {
+            GObject obj = context.sender as GObject;
+            int index = (int)obj.data;
+            StoryFightCfg storyFightCfg = StoryFightCfgArray.Instance.GetCfg(_storyLevelCfgs[index].fightID);
+            int itemId = storyFightCfg.bonusBaseArr[0][0];
+            GoodsItemTipsController.ShowItemTips(itemId);
+
+        }
+        private void UpdateItem()
+        {
+            for (int i = 0; i < _ui.m_list.numChildren; i++)
+            {
+                _ui.m_list.GetChildAt(i).visible = false;
+            }
+            itemIndex = 0;
+            Timers.inst.Add(0.05f, _ui.m_list.numChildren, AddItemUpdate, 1);
+        }
+
+        private void AddItemUpdate(object param)
+        {
+            _ui.m_list.GetChildAt(itemIndex).visible = true;
+            UI_ListLevelItem item = UI_ListLevelItem.Proxy(_ui.m_list.GetChildAt(itemIndex));
+            item.m_Left.Play();
+            itemIndex++;
+            UI_ListLevelItem.ProxyEnd();
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerFightView.cs.meta

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

+ 0 - 86
GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerStoryView.cs

@@ -39,7 +39,6 @@ namespace GFGGame
             viewCom = _ui.target;
             isfullScreen = true;
             isReturnView = true;
-            _ui.m_list.itemRenderer = RenderListItem;
 
             _ui.m_btnBack.onClick.Add(OnClickBtnBack);
         }
@@ -60,8 +59,6 @@ namespace GFGGame
             _activityCfg = ActivityOpenCfgArray.Instance.GetCfg(_activityId);
             _activityFightCfg = ActivityFightCfgArray.Instance.GetCfg(_activityCfg.params3Arr[0]);
             _storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(_activityFightCfg.type, _activityFightCfg.subType, _activityCfg.params3Arr[0]);
-            _ui.m_list.numItems = _storyLevelCfgs.Count;
-            UpdateItem();
         }
 
         protected override void OnHide()
@@ -79,88 +76,5 @@ namespace GFGGame
             ViewManager.GoBackFrom(typeof(OpenServerStoryView).FullName);
         }
 
-        private void RenderListItem(int index, GObject obj)
-        {
-            // int _index = _storyLevelCfgs.Count - index - 1;
-            UI_ListLevelItem item = UI_ListLevelItem.Proxy(obj);
-            //item.m_c1.selectedIndex = index % 2 == 0 ? 0 : 1;
-            item.m_txtName.text = _storyLevelCfgs[index].name;
-            bool isFight = string.IsNullOrEmpty(_storyLevelCfgs[index].storyStartID);
-            string resBg = isFight ? "cyjd_di_1" : "cyjd_di_2";
-            //item.m_loaBg.url = string.Format("ui://Studio/{0}", resBg);
-
-            if (isFight)
-            {
-                //item.m_loaBg.url = "ui://Studio/cyjd_di_1";
-                item.m_loaIcon.visible = false;
-                item.m_loaItem.visible = true;
-                StoryFightCfg storyFightCfg = StoryFightCfgArray.Instance.GetCfg(_storyLevelCfgs[index].fightID);
-                int itemId = storyFightCfg.bonusBaseArr[0][0];
-                ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
-                item.m_loaItem.url = ResPathUtil.GetIconPath(itemCfg);
-                if (item.m_loaItem.data == null)
-                {
-                    item.m_loaItem.onClick.Add(OnLoaItemClick);
-                }
-                item.m_loaItem.data = index;
-            }
-            else
-            {
-                //item.m_loaBg.url = "ui://Studio/cyjd_di_2";
-                item.m_loaItem.visible = false;
-                item.m_loaIcon.visible = true;
-                item.m_loaIcon.url = string.Format("ui://Studio/{0}", _activityFightCfg.res);
-            }
-            item.m_grpLock.visible = index > 0 && !InstanceZonesDataManager.CheckLevelPass(_storyLevelCfgs[index - 1].id);
-            item.m_comFlower.m_c1.selectedIndex = InstanceZonesDataManager.GetStarCountHistory(_storyLevelCfgs[index].id);
-            if (item.m_loaBg.data == null)
-            {
-                item.m_loaBg.onClick.Add(OnListItemClick);
-            }
-            item.m_loaBg.data = index;
-            UI_ListLevelItem.ProxyEnd();
-        }
-
-        private void OnListItemClick(EventContext context)
-        {
-            GObject obj = context.sender as GObject;
-            int index = (int)obj.data;
-            StoryLevelCfg storyLevelCfg = _storyLevelCfgs[index];
-            if (index > 0 && !InstanceZonesDataManager.CheckLevelPass(_storyLevelCfgs[index - 1].id))
-            {
-                PromptController.Instance.ShowFloatTextPrompt("Ðèͨ¹ØÇ°Öùؿ¨");
-                return;
-            }
-            MainStoryDataManager.currentLevelCfgId = storyLevelCfg.id;
-            InstanceZonesController.ShowLevelView(storyLevelCfg.id, StudioDataManager.Instance.OnFinishStudioStoryLevel);
-        }
-
-        private void OnLoaItemClick(EventContext context)
-        {
-            GObject obj = context.sender as GObject;
-            int index = (int)obj.data;
-            StoryFightCfg storyFightCfg = StoryFightCfgArray.Instance.GetCfg(_storyLevelCfgs[index].fightID);
-            int itemId = storyFightCfg.bonusBaseArr[0][0];
-            GoodsItemTipsController.ShowItemTips(itemId);
-
-        }
-        private void UpdateItem()
-        {
-            for (int i = 0; i < _ui.m_list.numChildren; i++)
-            {
-                _ui.m_list.GetChildAt(i).visible = false;
-            }
-            itemIndex = 0;
-            Timers.inst.Add(0.05f, _ui.m_list.numChildren, AddItemUpdate, 1);
-        }
-
-        private void AddItemUpdate(object param)
-        {
-            _ui.m_list.GetChildAt(itemIndex).visible = true;
-            UI_ListLevelItem item = UI_ListLevelItem.Proxy(_ui.m_list.GetChildAt(itemIndex));
-            item.m_Left.Play();
-            itemIndex++;
-            UI_ListLevelItem.ProxyEnd();
-        }
     }
 }

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


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_3!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_3.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_6!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_6.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_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