zhangyuqian 11 сар өмнө
parent
commit
83631626c5

+ 74 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ActivityGetYuanXiao/UI_RewardTipsUI.cs

@@ -0,0 +1,74 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.ActivityGetYuanXiao
+{
+    public partial class UI_RewardTipsUI
+    {
+        public GComponent target;
+        public GList m_rewardList;
+        public Transition m_t0;
+        public const string URL = "ui://tguohf7uuufi3m";
+        public const string PACKAGE_NAME = "ActivityGetYuanXiao";
+        public const string RES_NAME = "RewardTipsUI";
+        private static UI_RewardTipsUI _proxy;
+
+        public static UI_RewardTipsUI Create(GObject gObject = null)
+        {
+            var ui = new UI_RewardTipsUI();
+            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_RewardTipsUI Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_RewardTipsUI();
+            }
+            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_rewardList = (GList)comp.GetChild("rewardList");
+            m_t0 = comp.GetTransition("t0");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_rewardList = null;
+            m_t0 = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ActivityGetYuanXiao/UI_RewardTipsUI.cs.meta

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

+ 17 - 3
GameClient/Assets/Game/HotUpdate/Views/ActivityGetYuanXiao/ActivityGetYuanXiaoEntryView.cs

@@ -11,6 +11,7 @@ namespace GFGGame
     public class ActivityGetYuanXiaoEntryView : BaseView
     {
         private UI_ActivityGetYuanXiaoEntryUI _ui;
+        private int index;
         private ValueBarController _valueBarController;
         private Dictionary<string, EffectUI> _effectUIDic = new Dictionary<string, EffectUI>();
         private int _curLevel;
@@ -78,7 +79,7 @@ namespace GFGGame
             _ui.m_list.selectedIndex = Mathf.Min(_curLevel, ActivityGetYuanXiaoDataManager.Instance.gameinfoList.Count - 1);
             AutoLocationCurLevel();
             UpdateRedDots();
-
+            index = _ui.m_list.selectedIndex;
             UpdateTime(null);
             Timers.inst.Remove(UpdateTime);
             Timers.inst.Add(1, 0, UpdateTime);
@@ -124,10 +125,23 @@ namespace GFGGame
                 stateIndex = 2;
             }
             level.m_c1.selectedIndex = stateIndex;
-
+            level.target.onClick.Add(OnBtnClick);
+            
             UI_level.ProxyEnd();
         }
-
+        private void OnBtnClick(EventContext context)
+        {
+            GObject gObject = context.sender as GObject;
+            int id = (int)gObject.data;
+            if(id != index)
+            {
+                index = id;
+                return;
+            }
+            index = id;
+            PickUpGame cfg= PickUpGameArray.Instance.dataArray[id];
+            ViewManager.Show<ActivityZLFGRewardTips>(cfg);
+        }    
         private void OnBtnStartClick()
         {
             int activityID = ActivityDataManager.Instance.GetCurOpenActiveByType(ActivityType.YuanXiao);

+ 78 - 0
GameClient/Assets/Game/HotUpdate/Views/ActivityGetYuanXiao/ActivityZLFGRewardTips.cs

@@ -0,0 +1,78 @@
+using FairyGUI;
+using System.Collections;
+using System.Collections.Generic;
+using UI.ActivityGetYuanXiao;
+using UI.CommonGame;
+
+namespace GFGGame
+{
+    class ActivityZLFGRewardTips : BaseWindow
+    {
+        private UI_RewardTipsUI _ui;
+        private PickUpGame _cfg;
+        public override void Dispose()
+        {
+            if (_ui != null)
+            {
+                _ui.Dispose();
+                _ui = null;
+            }
+            base.Dispose();
+        }
+        protected override void OnInit()
+        {
+            base.OnInit();
+            packageName = UI_RewardTipsUI.PACKAGE_NAME;
+            _ui = UI_RewardTipsUI.Create();
+            this.viewCom = _ui.target;
+            modal = true;
+            this.viewCom.Center();
+
+            viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
+            _ui.m_rewardList.itemRenderer = ListItemRender;
+            _ui.m_rewardList.onClickItem.Add(OnListSelectorItemClick);
+        }
+        protected override void OnShown()
+        {
+            base.OnShown();
+            _cfg = (PickUpGame)this.viewData;
+            _ui.m_rewardList.numItems = _cfg.bonusWinArr.Length;
+        }
+        protected override void OnHide()
+        {
+            base.OnHide();
+        }
+        protected override void AddEventListener()
+        {
+            base.AddEventListener();
+        }
+
+        protected override void RemoveEventListener()
+        {
+            base.RemoveEventListener();
+        }
+        private void OnClickChange()
+        {
+            this.Hide();
+        }
+        private void ListItemRender(int index, GObject obj)
+        {
+            UI_ComItem uiItemChild = UI_ComItem.Proxy(obj);
+            var itemCfg = ItemCfgArray.Instance.GetCfg(_cfg.bonusWinArr[index][0]);
+            var itemCfgChild = ItemCfgArray.Instance.GetCfg(_cfg.bonusWinArr[index][0]);
+            uiItemChild.m_loaIcon.url = ResPathUtil.GetIconPath(itemCfgChild);
+            uiItemChild.m_txtCount.text = _cfg.bonusWinArr[index][1].ToString();
+            uiItemChild.target.data = itemCfgChild;
+            uiItemChild.m_QualityType.selectedIndex = itemCfgChild.rarity - 1;
+            UI_ComItem.ProxyEnd();
+        }
+
+        //弹出物品详细描述框
+        private void OnListSelectorItemClick(EventContext context)
+        {
+            GComponent item = context.data as GComponent;
+            ItemCfg itemCfg = item.data as ItemCfg;
+            GoodsItemTipsController.ShowItemTips(itemCfg.id);
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Views/ActivityGetYuanXiao/ActivityZLFGRewardTips.cs.meta

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

BIN
GameClient/Assets/ResIn/UI/ActivityGetYuanXiao/ActivityGetYuanXiao_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/ActivityGetYuanXiao/ActivityGetYuanXiao_atlas0.png


BIN
GameClient/Assets/ResIn/UI/ActivityGetYuanXiao/ActivityGetYuanXiao_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/ActivityGetYuanXiao/ActivityGetYuanXiao_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/ActivityGetYuanXiao/ActivityGetYuanXiao_fui.bytes