Эх сурвалжийг харах

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

guodong 1 жил өмнө
parent
commit
a90b25c497

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ActivityAfternoonTea/UI_ActivityTeaMainUI.cs

@@ -7,7 +7,7 @@ namespace UI.ActivityAfternoonTea
     public partial class UI_ActivityTeaMainUI
     {
         public GComponent target;
-        public GLoader m_loaBg;
+        public GLoader m_Bg;
         public GButton m_btnBack;
         public GLoader m_titleBg;
         public GLoader m_oneTimeIcon;
@@ -67,7 +67,7 @@ namespace UI.ActivityAfternoonTea
 
         private void Init(GComponent comp)
         {
-            m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_Bg = (GLoader)comp.GetChild("Bg");
             m_btnBack = (GButton)comp.GetChild("btnBack");
             m_titleBg = (GLoader)comp.GetChild("titleBg");
             m_oneTimeIcon = (GLoader)comp.GetChild("oneTimeIcon");
@@ -83,7 +83,7 @@ namespace UI.ActivityAfternoonTea
         }
         public void Dispose(bool disposeTarget = false)
         {
-            m_loaBg = null;
+            m_Bg = null;
             m_btnBack = null;
             m_titleBg = null;
             m_oneTimeIcon = null;

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Common/UI_ModalStatusUI.cs

@@ -7,6 +7,7 @@ namespace UI.Common
     public partial class UI_ModalStatusUI
     {
         public GComponent target;
+        public GGraph m_mask;
         public GTextField m_txtMessage;
         public GGraph m_holder;
         public const string URL = "ui://mk0fwx0xd4iw4m";
@@ -56,11 +57,13 @@ namespace UI.Common
 
         private void Init(GComponent comp)
         {
+            m_mask = (GGraph)comp.GetChild("mask");
             m_txtMessage = (GTextField)comp.GetChild("txtMessage");
             m_holder = (GGraph)comp.GetChild("holder");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_mask = null;
             m_txtMessage = null;
             m_holder = null;
             if(disposeTarget && target != null)

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

@@ -7,7 +7,7 @@ namespace UI.CommonGame
     public partial class UI_RewardUI
     {
         public GComponent target;
-        public GGraph m_bg;
+        public GGraph m_mask;
         public GGraph m_holderBgCom;
         public GGraph m_holderTitle;
         public GGroup m_downTipsText;
@@ -61,7 +61,7 @@ namespace UI.CommonGame
 
         private void Init(GComponent comp)
         {
-            m_bg = (GGraph)comp.GetChild("bg");
+            m_mask = (GGraph)comp.GetChild("mask");
             m_holderBgCom = (GGraph)comp.GetChild("holderBgCom");
             m_holderTitle = (GGraph)comp.GetChild("holderTitle");
             m_downTipsText = (GGroup)comp.GetChild("downTipsText");
@@ -71,7 +71,7 @@ namespace UI.CommonGame
         }
         public void Dispose(bool disposeTarget = false)
         {
-            m_bg = null;
+            m_mask = null;
             m_holderBgCom = null;
             m_holderTitle = null;
             m_downTipsText = null;

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DressUp/UI_PhotographSaveUI.cs

@@ -7,6 +7,7 @@ namespace UI.DressUp
     public partial class UI_PhotographSaveUI
     {
         public GComponent target;
+        public GGraph m_mask;
         public GImage m_imgRes;
         public GImage m_imgBorder;
         public GButton m_btnClose;
@@ -62,6 +63,7 @@ namespace UI.DressUp
 
         private void Init(GComponent comp)
         {
+            m_mask = (GGraph)comp.GetChild("mask");
             m_imgRes = (GImage)comp.GetChild("imgRes");
             m_imgBorder = (GImage)comp.GetChild("imgBorder");
             m_btnClose = (GButton)comp.GetChild("btnClose");
@@ -73,6 +75,7 @@ namespace UI.DressUp
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_mask = null;
             m_imgRes = null;
             m_imgBorder = null;
             m_btnClose = null;

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_StoryFightSingleScoreUI.cs

@@ -7,6 +7,7 @@ namespace UI.Main
     public partial class UI_StoryFightSingleScoreUI
     {
         public GComponent target;
+        public GLoader m_loaBg;
         public GLoader m_bg;
         public GGraph m_bgEffect;
         public GGraph m_holder;
@@ -62,6 +63,7 @@ namespace UI.Main
 
         private void Init(GComponent comp)
         {
+            m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_bg = (GLoader)comp.GetChild("bg");
             m_bgEffect = (GGraph)comp.GetChild("bgEffect");
             m_holder = (GGraph)comp.GetChild("holder");
@@ -73,6 +75,7 @@ namespace UI.Main
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_loaBg = null;
             m_bg = null;
             m_bgEffect = null;
             m_holder = null;

+ 6 - 6
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_StudioFilingUI.cs

@@ -8,12 +8,12 @@ namespace UI.Studio
     {
         public GComponent target;
         public Controller m_type;
-        public GLoader m_Bg;
+        public GLoader m_loaBg;
         public GComponent m_comValueBar;
         public GButton m_btnBack;
         public GButton m_btnChange;
         public GLoader m_btnChageLine;
-        public GLoader m_loaBg;
+        public GLoader m_role;
         public GList m_list;
         public GButton m_btnReward;
         public GButton m_btnSuit;
@@ -71,12 +71,12 @@ namespace UI.Studio
         private void Init(GComponent comp)
         {
             m_type = comp.GetController("type");
-            m_Bg = (GLoader)comp.GetChild("Bg");
+            m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_comValueBar = (GComponent)comp.GetChild("comValueBar");
             m_btnBack = (GButton)comp.GetChild("btnBack");
             m_btnChange = (GButton)comp.GetChild("btnChange");
             m_btnChageLine = (GLoader)comp.GetChild("btnChageLine");
-            m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_role = (GLoader)comp.GetChild("role");
             m_list = (GList)comp.GetChild("list");
             m_btnReward = (GButton)comp.GetChild("btnReward");
             m_btnSuit = (GButton)comp.GetChild("btnSuit");
@@ -90,12 +90,12 @@ namespace UI.Studio
         public void Dispose(bool disposeTarget = false)
         {
             m_type = null;
-            m_Bg = null;
+            m_loaBg = null;
             m_comValueBar = null;
             m_btnBack = null;
             m_btnChange = null;
             m_btnChageLine = null;
-            m_loaBg = null;
+            m_role = null;
             m_list = null;
             m_btnReward = null;
             m_btnSuit = null;

+ 20 - 10
GameClient/Assets/Game/HotUpdate/Views/ActivityAfternoonTea/ActivityTeaVisitView.cs

@@ -11,6 +11,7 @@ namespace GFGGame
     {
         private UI_ActivityTeaVisitUI _ui;
         private int time;
+        private int activityID;
         private EffectUI _effectUI1;
         public override void Dispose()
         {
@@ -51,17 +52,17 @@ namespace GFGGame
             base.OnShown();
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("xnbh_bg");
             _ui.m_ruleIcon.data = 300028;
-
-
+            activityID = 5004;
             RoleLimitData limitData = RoleLimitDataManager.GetLimitData(ActivityVisitCfgArray.Instance.dataArray[0].limitId);
             time = limitData.TotalPlayMax - limitData.PlayTimes;
             _ui.m_visitNum.text = "当前拜访次数:" + time + "/" + limitData.TotalPlayMax;
-
             _ui.m_taskList.numItems = ActivityVisitCfgArray.Instance.dataArray.Length;
-            long timeActivity = ActivityTeaDataManager.Instance.GetEndTime(ActivityType.NewYearVisit) - TimeHelper.ServerNow();
-            _ui.m_time.text = timeActivity > TimeUtil.SECOND_PER_DAY * 1000 ? TimeUtil.FormattingTimeTo_DDHHmm(timeActivity) : TimeUtil.FormattingTimeTo_HHmmss(timeActivity);
-
-            Timers.inst.Add(60.0f, 0, UpdateTime);
+            ActivityOpenCfg _activityCfg = ActivityOpenCfgArray.Instance.GetCfg(activityID);
+            long endTime = TimeUtil.DateTimeToTimestamp(_activityCfg.endTime);
+            long curTime = TimeHelper.ServerNow();
+            TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
+            _ui.m_time.text = "剩余时间:" + TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime);
+            Timers.inst.Add(1, 0, UpdateTime);
         }
 
         protected override void OnHide()
@@ -86,9 +87,18 @@ namespace GFGGame
         
         private void UpdateTime(object param = null)
         {
-            long timeActivity = ActivityTeaDataManager.Instance.GetEndTime(ActivityType.NewYearVisit) - TimeHelper.ServerNow();
-            _ui.m_time.text = timeActivity > TimeUtil.SECOND_PER_DAY * 1000 ? TimeUtil.FormattingTimeTo_DDHHmm(timeActivity) : TimeUtil.FormattingTimeTo_HHmmss(timeActivity);
-
+            ActivityOpenCfg _activityCfg = ActivityOpenCfgArray.Instance.GetCfg(activityID);
+            long endTime = TimeUtil.DateTimeToTimestamp(_activityCfg.endTime);
+            long curTime = TimeHelper.ServerNow();
+            if (endTime < curTime)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("活动已结束");
+                Timers.inst.Remove(UpdateTime);
+                GameController.GoBackToMainView();
+                return;
+            }
+            TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
+            _ui.m_time.text = "剩余时间:" + TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime);
         }
 
         private void UpdateVisitNum()

+ 25 - 11
GameClient/Assets/Game/HotUpdate/Views/ActivityMainTips/ActivityZCJBChapterView.cs

@@ -4,6 +4,7 @@ using UI.Main;
 using System.Collections.Generic;
 using UnityEngine;
 using System.Collections;
+using Assets.Game.HotUpdate.Data;
 using ET;
 
 namespace GFGGame
@@ -134,17 +135,20 @@ namespace GFGGame
 
             _valueBarController.OnShown();
 
-                UI_ComponentValueBar valueBar = UI_ComponentValueBar.Proxy(_ui.m_valueBar);
-                valueBar.m_c1.selectedIndex = 12;
-                UI_ComponentValueBar.ProxyEnd();
-                _valueBarController.UpdateList(new List<int>() { 3000023, ConstItemID.DIAMOND_PURPLE, ConstItemID.DIAMOND_RED });
-                _ui.m_selectChapter.visible = false;
-                _ui.m_switchChapter.visible = false;
-                _ui.m_bonusBox.visible = false;
-                _ui.m_ActivityZCJB.visible = true;
-                long timeActivity = ActivityGlobalDataManager.Instance.GetActivityInfoOneByType(17).EndTime - TimeHelper.ServerNow();
-                _ui.m_ZCJBTimeText.text = "剩余时间:" + (timeActivity > TimeUtil.SECOND_PER_DAY * 1000 ? TimeUtil.FormattingTimeTo_DDHHmm(timeActivity) : TimeUtil.FormattingTimeTo_HHmmss(timeActivity));
-                Timers.inst.Add(60.0f, 0, UpdateActivityTime);
+            UI_ComponentValueBar valueBar = UI_ComponentValueBar.Proxy(_ui.m_valueBar);
+            valueBar.m_c1.selectedIndex = 12;
+            UI_ComponentValueBar.ProxyEnd();
+            _valueBarController.UpdateList(new List<int>() { 3000023, ConstItemID.DIAMOND_PURPLE, ConstItemID.DIAMOND_RED });
+            _ui.m_selectChapter.visible = false;
+            _ui.m_switchChapter.visible = false;
+            _ui.m_bonusBox.visible = false;
+            _ui.m_ActivityZCJB.visible = true;
+            ActivityOpenCfg _activityCfg = ActivityOpenCfgArray.Instance.GetCfg(5006);
+            long endTime = TimeUtil.DateTimeToTimestamp(_activityCfg.endTime);
+            long curTime = TimeHelper.ServerNow();
+            TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
+            _ui.m_ZCJBTimeText.text = "剩余时间:" + TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime);
+            Timers.inst.Add(1, 0, UpdateActivityTime);
             //
             _ui.m_t0.SetHook("canHit", () => { GRoot.inst.touchable = true; });
             _ui.m_t0.Play();
@@ -373,6 +377,16 @@ namespace GFGGame
 
         private void UpdateActivityTime(object param = null)
         {
+            ActivityOpenCfg _activityCfg = ActivityOpenCfgArray.Instance.GetCfg(5006);
+            long endTime = TimeUtil.DateTimeToTimestamp(_activityCfg.endTime);
+            long curTime = TimeHelper.ServerNow();
+            if (endTime < curTime)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("活动已结束");
+                Timers.inst.Remove(UpdateActivityTime);
+                GameController.GoBackToMainView();
+                return;
+            }
             long timeActivity = ActivityGlobalDataManager.Instance.GetActivityInfoOneByType(17).EndTime - TimeHelper.ServerNow();
             _ui.m_ZCJBTimeText.text = "剩余时间:" + (timeActivity > TimeUtil.SECOND_PER_DAY * 1000 ? TimeUtil.FormattingTimeTo_DDHHmm(timeActivity) : TimeUtil.FormattingTimeTo_HHmmss(timeActivity));
         }

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

@@ -44,7 +44,7 @@ namespace GFGGame
             isfullScreen = true;
 
             _ui.m_comList.m_listReward.itemRenderer = RenderListRewardItem;
-            _ui.m_bg.onClick.Add(this.Hide);
+            _ui.m_mask.onClick.Add(this.Hide);
         }
         protected override void OnShown()
         {

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

@@ -187,7 +187,7 @@ namespace GFGGame
             dressUpObjUI.ResetSceneObj(100, false, true, null, false);
             dressUpObjUI.dressUpObj.PutOnItemList(roleData.itemList);
             dressUpObjUI.UpdateWrapper(_ui.m_holder);
-            _ui.m_bg.url = ResPathUtil.GetBgImgPath("zd_g_bg");
+            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("zd_g_bg");
 
             if (!FightDataManager.Instance.autoPlay)
             {

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFilingView.cs

@@ -41,7 +41,7 @@ namespace GFGGame
             isReturnView = true;
             _valueBarController = new ValueBarController(_ui.m_comValueBar);
 
-            _ui.m_Bg.url = ResPathUtil.GetBgImgPath("bg_fhl");
+            _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("bg_fhl");
             _ui.m_btnChageLine.url = ResPathUtil.GetCommonGameResPath("zsx_fl");
 
             _ui.m_list.itemRenderer = RenderListItem;
@@ -116,7 +116,7 @@ namespace GFGGame
             RoleLimitData limitData = RoleLimitDataManager.GetLimitData(this._studioCfg.limit);
             var limitCfg = LimitCfgArray.Instance.GetCfg(this._studioCfg.limit);
             _ui.m_btnAdd.visible = limitCfg.itemID > 0;
-            _ui.m_loaBg.url = ResPathUtil.GetStudioFilingPicPath(_studioCfg.res); //ResPathUtil.GetBgImgPath(_studioCfg.res);
+            _ui.m_role.url = ResPathUtil.GetStudioFilingPicPath(_studioCfg.res); //ResPathUtil.GetBgImgPath(_studioCfg.res);
             _ui.m_btnChange.title = _studioCfg.name;
             _ui.m_txtNum.text = string.Format("剩余次数:{0}/{1}", limitData.TotalPlayMax - limitData.PlayTimes, limitData.MaxStorageCount);
 

BIN
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Common/Common_fui.bytes


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


BIN
GameClient/Assets/ResIn/UI/DressUp/DressUp_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes