瀏覽代碼

兑换物品 和 成就bug修改

huangxiaoyue 1 年之前
父節點
當前提交
364f1682b2

+ 6 - 0
GameClient/Assets/Game/HotUpdate/Data/TaskDataManager.cs

@@ -102,6 +102,12 @@ namespace GFGGame
                 var stateA = TaskInfosDic[a.id].State == 1 ? 1 : -1;
                 var stateB = TaskInfosDic[b.id].State == 1 ? 1 : -1;
                 if (stateA > stateB) return -1;
+                else if (stateA == stateB) { 
+                    if(a.id > b.id) 
+                        return 1;
+                    else
+                        return -1;
+                }
                 return stateB > stateA ? 1 : TaskInfosDic[a.id].State.CompareTo(TaskInfosDic[b.id].State);
             });
             return cfgs;

+ 8 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/PopWindow.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cc53a06d9d56736418cf81667932a9e8
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 74 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/PopWindow/UI_ExchangeGoodsUI.cs

@@ -0,0 +1,74 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.PopWindow
+{
+    public partial class UI_ExchangeGoodsUI
+    {
+        public GComponent target;
+        public GGraph m_holderLeftTop;
+        public GGraph m_holderRightDowm;
+        public const string URL = "ui://i9tn319dnzuq0";
+        public const string PACKAGE_NAME = "PopWindow";
+        public const string RES_NAME = "ExchangeGoodsUI";
+        private static UI_ExchangeGoodsUI _proxy;
+
+        public static UI_ExchangeGoodsUI Create(GObject gObject = null)
+        {
+            var ui = new UI_ExchangeGoodsUI();
+            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_ExchangeGoodsUI Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ExchangeGoodsUI();
+            }
+            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_holderLeftTop = (GGraph)comp.GetChild("holderLeftTop");
+            m_holderRightDowm = (GGraph)comp.GetChild("holderRightDowm");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_holderLeftTop = null;
+            m_holderRightDowm = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/PopWindow/UI_ExchangeGoodsUI.cs.meta

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

+ 8 - 0
GameClient/Assets/Game/HotUpdate/Views/PopWindow.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4e3f8e73d15545241b218aeb9d327d3e
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 65 - 0
GameClient/Assets/Game/HotUpdate/Views/PopWindow/ExchangeGoodsView.cs

@@ -0,0 +1,65 @@
+using FairyGUI;
+using UI.PopWindow;
+
+namespace GFGGame
+{
+    public class ExchangeGoodsView : BaseWindow
+    {
+        private UI_ExchangeGoodsUI _ui;
+
+        public override void Dispose()
+        {
+            if (_ui != null)
+            {
+                _ui.Dispose();
+                _ui = null;
+            }
+
+            base.Dispose();
+        }
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+            packageName = UI_ExchangeGoodsUI.PACKAGE_NAME;
+            _ui = UI_ExchangeGoodsUI.Create();
+            viewCom = _ui.target;
+            isfullScreen = true;
+            bringToFontOnClick = false;
+            //_ui.m_btnBack.onClick.Add(OnBtnBackClick);
+        }
+
+        private void OnBtnBackClick()
+        {
+            ViewManager.Hide<CombTaskController>();
+            //ViewManager.Hide<BattlePassTaskView>();
+            ViewManager.GoBackFrom(typeof(TaskView).FullName);
+        }
+
+        private void OnBtnAchieveClick()
+        {
+            ViewManager.Show<TaskAchieveView>();
+        }
+            
+        protected override void AddEventListener()
+        {
+            base.AddEventListener();
+        }
+
+        protected override void RemoveEventListener()
+        {
+            base.RemoveEventListener();
+        }
+
+        protected override void OnShown()
+        {
+            base.OnShown();
+          
+        }
+
+        protected override void OnHide()
+        {
+            base.OnHide();
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/PopWindow/ExchangeGoodsView.cs.meta

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

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/Task/TaskAchieveDetailView.cs

@@ -39,7 +39,6 @@ namespace GFGGame
         {
             ViewManager.Hide<TaskAchieveDetailView>();
         }
-
     
         protected override void AddEventListener()
         {
@@ -55,6 +54,7 @@ namespace GFGGame
         {
             base.OnShown();
             UpdateTask();
+            _ui.m_listAchieveTask.ScrollToView(0);
         }
 
         protected override void OnHide()
@@ -68,9 +68,9 @@ namespace GFGGame
             _ui.m_AchieveType.selectedIndex = taskSubType;
             _cfgsAll = TaskDataManager.Instance.GetTaskCfgs(funcType);
             _cfgs.Clear();
-            foreach (var info in _cfgsAll) {
-                if (info.achievementType == taskSubType+1)
-                    _cfgs.Add(info);
+            for (int i= 0; i< _cfgsAll.Count;i++) {
+                if (_cfgsAll[i].achievementType == taskSubType+1)
+                    _cfgs.Add(_cfgsAll[i]);
             }
             _ui.m_listAchieveTask.numItems = _cfgs.Count;
         }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Task/TaskAchieveView.cs

@@ -103,7 +103,7 @@ namespace GFGGame
                 }
             }
 
-            RedDotController.Instance.SetComRedDot(listItem.target, TaskDataManager.Instance.CheckTaskSubRewardCanGet(TaskFuncType.Achievement, index),"",-10,60);
+            RedDotController.Instance.SetComRedDot(listItem.target, TaskDataManager.Instance.CheckTaskSubRewardCanGet(TaskFuncType.Achievement, index),"",-30,120);
 
             UI_AchieveItem.ProxyEnd();
         }

二進制
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes