Browse Source

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

# Conflicts:
#	GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs
leiyasi 1 year ago
parent
commit
9d4aa0da64

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -178,6 +178,9 @@ namespace GFGGame
         //摘星抽奖活动奖励
         public const string LUCKY_BOX_ACTIVITY_REWARD = "LUCKY_BOX_ACTIVITY_REWARD";
 
+        //摘星抽奖等待动画加载
+        public const string LUCKY_BOX_ANIMATION_WAIT = "LUCKY_BOX_ANIMATION_WAIT";
+
         // 服装散件图鉴配置加载完成
         public const string DRESS_PART_LOAD_FINISHED = "DRESS_PART_LOAD_FINISHED";
 

+ 6 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComBox.cs

@@ -15,10 +15,11 @@ namespace UI.LuckyBox
         public UI_ComCost2 m_comCostOne;
         public UI_ComCost2 m_comCostTen;
         public GButton m_btnBuyOne;
+        public GGraph m_btnBuyTen_eff;
         public GButton m_btnBuyTen;
         public GTextField m_txtRemainTimes;
+        public GGraph m_Special_eff;
         public GImage m_imgSpecial;
-        public GGraph m_holder;
         public GGroup m_grpSpecial;
         public const string URL = "ui://drx9d1usnjmn2p";
         public const string PACKAGE_NAME = "LuckyBox";
@@ -75,10 +76,11 @@ namespace UI.LuckyBox
             m_comCostOne = (UI_ComCost2)UI_ComCost2.Create(comp.GetChild("comCostOne"));
             m_comCostTen = (UI_ComCost2)UI_ComCost2.Create(comp.GetChild("comCostTen"));
             m_btnBuyOne = (GButton)comp.GetChild("btnBuyOne");
+            m_btnBuyTen_eff = (GGraph)comp.GetChild("btnBuyTen_eff");
             m_btnBuyTen = (GButton)comp.GetChild("btnBuyTen");
             m_txtRemainTimes = (GTextField)comp.GetChild("txtRemainTimes");
+            m_Special_eff = (GGraph)comp.GetChild("Special_eff");
             m_imgSpecial = (GImage)comp.GetChild("imgSpecial");
-            m_holder = (GGraph)comp.GetChild("holder");
             m_grpSpecial = (GGroup)comp.GetChild("grpSpecial");
         }
         public void Dispose(bool disposeTarget = false)
@@ -95,10 +97,11 @@ namespace UI.LuckyBox
             m_comCostTen.Dispose();
             m_comCostTen = null;
             m_btnBuyOne = null;
+            m_btnBuyTen_eff = null;
             m_btnBuyTen = null;
             m_txtRemainTimes = null;
+            m_Special_eff = null;
             m_imgSpecial = null;
-            m_holder = null;
             m_grpSpecial = null;
             if(disposeTarget && target != null)
             {

+ 15 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_Component2.cs

@@ -11,12 +11,16 @@ namespace UI.LuckyBox
         public Controller m_FlipOpenType;
         public GGraph m_holder;
         public GGraph m_holder1;
+        public GLoader m_frame;
+        public GGraph m_ui_eff;
         public GLoader m_icon;
+        public GGraph m_flip_eff;
         public GLoader m_rarity;
         public GImage m_imgNew;
         public GTextField m_txtName;
-        public Transition m_t0;
+        public GGraph m_click_eff;
         public Transition m_t1;
+        public Transition m_t0;
         public const string URL = "ui://drx9d1usdcrotaa";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "Component2";
@@ -68,12 +72,16 @@ namespace UI.LuckyBox
             m_FlipOpenType = comp.GetController("FlipOpenType");
             m_holder = (GGraph)comp.GetChild("holder");
             m_holder1 = (GGraph)comp.GetChild("holder1");
+            m_frame = (GLoader)comp.GetChild("frame");
+            m_ui_eff = (GGraph)comp.GetChild("ui_eff");
             m_icon = (GLoader)comp.GetChild("icon");
+            m_flip_eff = (GGraph)comp.GetChild("flip_eff");
             m_rarity = (GLoader)comp.GetChild("rarity");
             m_imgNew = (GImage)comp.GetChild("imgNew");
             m_txtName = (GTextField)comp.GetChild("txtName");
-            m_t0 = comp.GetTransition("t0");
+            m_click_eff = (GGraph)comp.GetChild("click_eff");
             m_t1 = comp.GetTransition("t1");
+            m_t0 = comp.GetTransition("t0");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -81,12 +89,16 @@ namespace UI.LuckyBox
             m_FlipOpenType = null;
             m_holder = null;
             m_holder1 = null;
+            m_frame = null;
+            m_ui_eff = null;
             m_icon = null;
+            m_flip_eff = null;
             m_rarity = null;
             m_imgNew = null;
             m_txtName = null;
-            m_t0 = null;
+            m_click_eff = null;
             m_t1 = null;
+            m_t0 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_LuckyBoxNewDressUI.cs

@@ -15,6 +15,7 @@ namespace UI.LuckyBox
         public GButton m_btnPass;
         public Transition m_t_open;
         public Transition m_t_close;
+        public Transition m_t2;
         public const string URL = "ui://drx9d1usqdrt19";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "LuckyBoxNewDressUI";
@@ -70,6 +71,7 @@ namespace UI.LuckyBox
             m_btnPass = (GButton)comp.GetChild("btnPass");
             m_t_open = comp.GetTransition("t_open");
             m_t_close = comp.GetTransition("t_close");
+            m_t2 = comp.GetTransition("t2");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -82,6 +84,7 @@ namespace UI.LuckyBox
             m_btnPass = null;
             m_t_open = null;
             m_t_close = null;
+            m_t2 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_comLuckBoxBtn.cs

@@ -16,6 +16,8 @@ namespace UI.LuckyBox
         public GGraph m_holder;
         public GGroup m_grpSpecial;
         public GTextField m_txtFreeTime;
+        public GGraph m_btnBuyTen_eff;
+        public GGraph m_Special_eff;
         public const string URL = "ui://drx9d1usdkohtf7";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "comLuckBoxBtn";
@@ -72,6 +74,8 @@ namespace UI.LuckyBox
             m_holder = (GGraph)comp.GetChild("holder");
             m_grpSpecial = (GGroup)comp.GetChild("grpSpecial");
             m_txtFreeTime = (GTextField)comp.GetChild("txtFreeTime");
+            m_btnBuyTen_eff = (GGraph)comp.GetChild("btnBuyTen_eff");
+            m_Special_eff = (GGraph)comp.GetChild("Special_eff");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -86,6 +90,8 @@ namespace UI.LuckyBox
             m_holder = null;
             m_grpSpecial = null;
             m_txtFreeTime = null;
+            m_btnBuyTen_eff = null;
+            m_Special_eff = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Store/UI_ListShopItem.cs

@@ -10,9 +10,9 @@ namespace UI.Store
         public Controller m_c1;
         public Controller m_c2;
         public GImage m_imgDouble;
+        public GTextField m_txtDesc;
         public GGroup m_grpDiscount;
         public GGraph m_holderfEff;
-        public GTextField m_txtDesc;
         public GLoader m_icon;
         public GTextField m_txtName;
         public GTextField m_txtEndTime;
@@ -69,9 +69,9 @@ namespace UI.Store
             m_c1 = comp.GetController("c1");
             m_c2 = comp.GetController("c2");
             m_imgDouble = (GImage)comp.GetChild("imgDouble");
+            m_txtDesc = (GTextField)comp.GetChild("txtDesc");
             m_grpDiscount = (GGroup)comp.GetChild("grpDiscount");
             m_holderfEff = (GGraph)comp.GetChild("holderfEff");
-            m_txtDesc = (GTextField)comp.GetChild("txtDesc");
             m_icon = (GLoader)comp.GetChild("icon");
             m_txtName = (GTextField)comp.GetChild("txtName");
             m_txtEndTime = (GTextField)comp.GetChild("txtEndTime");
@@ -84,9 +84,9 @@ namespace UI.Store
             m_c1 = null;
             m_c2 = null;
             m_imgDouble = null;
+            m_txtDesc = null;
             m_grpDiscount = null;
             m_holderfEff = null;
-            m_txtDesc = null;
             m_icon = null;
             m_txtName = null;
             m_txtEndTime = null;

+ 6 - 1
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs

@@ -114,6 +114,9 @@ namespace GFGGame
         }
         private void UpdateCurrency()
         {
+            if (_valueBar == null || _valueBar.m_btnGold == null || _valueBar.m_btnDiamondPurple == null || _valueBar.m_btnDiamondRed == null)
+                return;
+
             _valueBar.m_btnGold.target.text = "" + RoleDataManager.gold;
             _valueBar.m_btnDiamondPurple.target.text = "" + RoleDataManager.diaP;
             _valueBar.m_btnDiamondRed.target.text = "" + RoleDataManager.diaR;
@@ -140,7 +143,9 @@ namespace GFGGame
             LuckyBoxCfg luckyBoxCfg = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.currentBoxId);
             if (luckyBoxCfg == null) return;
             _valueBar.m_btnCJ.target.text = "" + ItemDataManager.GetItemNum(luckyBoxCfg.costID);
-            _valueBar.m_btnCJ.target.icon = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(luckyBoxCfg.costID).res);
+            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(luckyBoxCfg.costID);
+            if (itemCfg == null) return;
+            _valueBar.m_btnCJ.target.icon = ResPathUtil.GetCommonGameResPath(itemCfg.res);
             _valueBar.m_btnCJ.target.data = luckyBoxCfg.costID;
         }
 

+ 6 - 1
GameClient/Assets/Game/HotUpdate/Views/CommonGame/GetSuitItemVIew.cs

@@ -41,12 +41,17 @@ namespace GFGGame
             this.viewCom = _ui.target;
             isfullScreen = true;
 
-            _dressUpObjUI = new DressUpObjUI("SceneDressUp");
+            _dressUpObjUI = new DressUpObjUI("SceneDressUp",onShowAction);
             _ui.m_bg.onClick.Add(OnClickBg);
 
             _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_holderEffect, "ui_ck", "ui_ck_tz");
         }
 
+        void onShowAction()
+        {
+            EventAgent.DispatchEvent(ConstMessage.LUCKY_BOX_ANIMATION_WAIT);
+        }
+
         protected override void OnShown()
         {
             base.OnShown();

+ 33 - 29
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs

@@ -11,17 +11,17 @@ namespace GFGGame
         private UI_LuckBoxBonusShowUI _ui;
         private List<ItemData> _rewardList = new List<ItemData>();
         private List<ItemData> _rewardItemList = new List<ItemData>();
-        private Dictionary<int , Dictionary<int, EffectUI>> _effListTen = new Dictionary<int, Dictionary<int, EffectUI>>();
+        private Dictionary<int, Dictionary<int, EffectUI>> _effListTen = new Dictionary<int, Dictionary<int, EffectUI>>();
         private Dictionary<int, EffectUI> _effList = new Dictionary<int, EffectUI>();
 
         private Dictionary<int, int> _itemIdList = new Dictionary<int, int>();
         private Dictionary<int, GComponent> _itemObjList = new Dictionary<int, GComponent>();
-        private List<int> _recordOpenIndex = new List<int>();  //记录打开过得item位置
-        private List<int> _recordTurnIndex = new List<int>();  //记录播放过item位置
-        private int _chooseIndex = -1;  //当前选中的index
-        private int _countShow = 0;   //第几次展示
-        private int _countNewRecord = 0;  //展示步骤
-        private bool _handClick = false;   //手动点击开启
+        private List<int> _recordOpenIndex = new List<int>();  //璁板綍鎵撳紑杩囧緱item浣嶇疆
+        private List<int> _recordTurnIndex = new List<int>();  //璁板綍鎾�斁杩噄tem浣嶇疆
+        private int _chooseIndex = -1;  //褰撳墠閫変腑鐨刬ndex
+        private int _countShow = 0;   //绗�嚑娆″睍绀�
+        private int _countNewRecord = 0;  //灞曠ず姝ラ�
+        private bool _handClick = false;   //鎵嬪姩鐐瑰嚮寮€鍚�
 
         private EffectUI _effectUI1;
         private EffectUI _effectUI2;
@@ -37,7 +37,8 @@ namespace GFGGame
             EffectUIPool.Recycle(_effectUI3);
             _effectUI3 = null;
 
-            for (int key = 0; key < _effListTen.Count; key++) {
+            for (int key = 0; key < _effListTen.Count; key++)
+            {
                 if (_effListTen.ContainsKey(key))
                 {
                     for (int key1 = 0; key1 < _effListTen[key].Count; key1++)
@@ -82,7 +83,7 @@ namespace GFGGame
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zx_bg");
 
             _ui.m_BtnPass.onClick.Add(OnClickBtnPass);
-            
+
             UpdateEffect();
         }
         private void UpdateEffect()
@@ -108,7 +109,8 @@ namespace GFGGame
         {
             if (_chooseIndex != -1 && GetSuitItemController.GetSuitWaitingToId(_itemIdList[_chooseIndex]))
                 ClickItem(_chooseIndex);
-            else {
+            else
+            {
                 if (_handClick)
                 {
                     _handClick = false;
@@ -169,10 +171,11 @@ namespace GFGGame
             item.m_comIcon.m_icon.url = ResPathUtil.GetIconPath(itemCfg);
             item.m_comIcon.m_FlipOpenType.selectedIndex = 1;
             item.m_comIcon.m_t1.Play();
+
             switch (itemCfg.rarity)
             {
                 case 1:
-                    
+
                     break;
                 case 2:
 
@@ -184,8 +187,8 @@ namespace GFGGame
                     _effectUIDic.Add("CK_Loop_Wait_Jin" + index, EffectUIPool.CreateEffectUI(item.m_waitClick_eff, "ui_LuckyBox", "CK_Loop_Wait_Jin"));
                     break;
             }
-            
-            //带特效的处理先注释
+
+            //甯︾壒鏁堢殑澶勭悊鍏堟敞閲�
             //item.m_comIcon.m_holder.visible = false;
             //item.m_comIcon.m_holder1.visible = false;
             //if (itemCfg.rarity > 2) { 
@@ -240,7 +243,7 @@ namespace GFGGame
             }
             item.target.data = index;
 
-            _itemIdList.Add(index,itemCfg.id);
+            _itemIdList.Add(index, itemCfg.id);
             _itemObjList.Add(index, com);
 
             UI_LuckyBoxBonusShowItem.ProxyEnd();
@@ -259,7 +262,7 @@ namespace GFGGame
             _ui.m_touchFlipOpen.touchable = true;
             _handClick = true;
             ClickItem(index);
-            Timers.inst.Add(1f, 1, UpClickDataTime,index);
+            Timers.inst.Add(1f, 1, UpClickDataTime, index);
         }
 
         private void UpClickDataTime(object param = null)
@@ -281,10 +284,9 @@ namespace GFGGame
                 _ui.m_BtnPass.visible = false;
 
             if (!_recordOpenIndex.Contains(index))
-            {
                 TurnItem(index);
-            }
-            else {
+            else
+            {
                 if (!_recordTurnIndex.Contains(index))
                     ShowTurnItem(index);
                 else
@@ -299,7 +301,8 @@ namespace GFGGame
                 _chooseIndex = -1;
                 this.Hide();
             }
-            else {
+            else
+            {
                 for (int index = 0; index < _rewardList.Count; index++)
                 {
                     if (!_recordOpenIndex.Contains(index))
@@ -353,7 +356,8 @@ namespace GFGGame
             _ui.m_touchFlipOpen.touchable = true;
             for (int i = 0; i < _rewardList.Count; i++)
             {
-                if (!_recordTurnIndex.Contains(i)) {
+                if (!_recordTurnIndex.Contains(i))
+                {
                     ShowTurnItem(i);
                     break;
                 }
@@ -373,7 +377,7 @@ namespace GFGGame
 
             if (item.m_comIcon.m_imgNew.visible)
             {
-                //判断是否有套装需要展示
+                //鍒ゆ柇鏄�惁鏈夊�瑁呴渶瑕佸睍绀�
                 if (GetSuitItemController.GetSuitWaitingToId(_itemIdList[index]))
                 {
                     if (_countShow < 1)
@@ -410,19 +414,20 @@ namespace GFGGame
                     _ui.m_touchFlipOpen.touchable = false;
                 }
             }
-            else {
+            else
+            {
                 _recordTurnIndex.Add(index);
                 _ui.m_touchFlipOpen.touchable = false;
             }
             UI_LuckyBoxBonusShowItem.ProxyEnd();
         }
-        
+
         private void TurnItem(int index)
         {
             if (!_recordOpenIndex.Contains(index))
             {
-                // 删除 “等待翻开” 的特效
-                if(_effectUIDic.ContainsKey("CK_Loop_Wait_Chen" + index))
+                // 鍒犻櫎 鈥滅瓑寰呯炕寮€鈥� 鐨勭壒鏁�
+                if (_effectUIDic.ContainsKey("CK_Loop_Wait_Chen" + index))
                 {
                     EffectUIPool.Recycle(_effectUIDic["CK_Loop_Wait_Chen" + index]);
                     _effectUIDic.Remove("CK_Loop_Wait_Chen" + index);
@@ -437,15 +442,15 @@ namespace GFGGame
                 if (!item.m_comIcon.m_imgNew.visible)
                     _recordTurnIndex.Add(index);
 
-                //先翻开牌面 
+                //鍏堢炕寮€鐗岄潰 
                 item.m_comIcon.m_FlipOpenType.selectedIndex = 0;
                 ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemIdList[index]);
                 item.m_t2.Play();
 
-                // 点击特效
+                // 鐐瑰嚮鐗规晥
                 _effectUIDic.Add("CK_Cirle_DJ" + index, EffectUIPool.CreateEffectUI(item.m_comIcon.m_click_eff, "ui_LuckyBox", "CK_Cirle_DJ"));
 
-                // 翻开特效
+                // 缈诲紑鐗规晥
                 switch (itemCfg.rarity)
                 {
                     case 1:
@@ -477,6 +482,5 @@ namespace GFGGame
             ViewManager.Hide<LuckyBoxNewDressView>();
             ViewManager.Hide<LuckyBoxNewCardView>();
         }
-
     }
 }

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -558,7 +558,9 @@ namespace GFGGame
         {
 
             GuideCfg cfg = GuideCfgArray.Instance.GetCfg(ConstGuideId.LUCKY_BOX);
-            if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0 && (GuideDataManager.currentGuideId == 0 || GuideDataManager.currentGuideIdIndex != 2))
+            if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0 
+                && (GuideDataManager.currentGuideId == 0 
+                || (GuideDataManager.currentGuideId == cfg.id && GuideDataManager.currentGuideIdIndex != 2)))
             {
                 //防止点击太快,在引导开启前就被点击到,导致引导卡死
                 return;

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_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Store/Store_fui.bytes