Browse Source

茶话会剧情对话框修改

huangxiaoyue 1 năm trước cách đây
mục cha
commit
99020fd596

+ 8 - 2
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_CompDialogName.cs

@@ -7,7 +7,9 @@ namespace UI.Main
     public partial class UI_CompDialogName
     {
         public GComponent target;
-        public GImage m_bg;
+        public Controller m_bgType;
+        public Controller m_showArrow;
+        public GLoader m_bg;
         public GTextField m_txtContent;
         public UI_CompArrow m_iconNext;
         public GTextField m_txtName;
@@ -59,7 +61,9 @@ namespace UI.Main
 
         private void Init(GComponent comp)
         {
-            m_bg = (GImage)comp.GetChild("bg");
+            m_bgType = comp.GetController("bgType");
+            m_showArrow = comp.GetController("showArrow");
+            m_bg = (GLoader)comp.GetChild("bg");
             m_txtContent = (GTextField)comp.GetChild("txtContent");
             m_iconNext = (UI_CompArrow)UI_CompArrow.Create(comp.GetChild("iconNext"));
             m_txtName = (GTextField)comp.GetChild("txtName");
@@ -67,6 +71,8 @@ namespace UI.Main
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_bgType = null;
+            m_showArrow = null;
             m_bg = null;
             m_txtContent = null;
             m_iconNext.Dispose();

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

@@ -7,6 +7,7 @@ namespace UI.Main
     public partial class UI_CompDialogText
     {
         public GComponent target;
+        public Controller m_showArrow;
         public GTextField m_txtContent;
         public UI_CompArrow m_iconNext;
         public const string URL = "ui://mfvz4q8knmnb2z";
@@ -56,11 +57,13 @@ namespace UI.Main
 
         private void Init(GComponent comp)
         {
+            m_showArrow = comp.GetController("showArrow");
             m_txtContent = (GTextField)comp.GetChild("txtContent");
             m_iconNext = (UI_CompArrow)UI_CompArrow.Create(comp.GetChild("iconNext"));
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_showArrow = null;
             m_txtContent = null;
             m_iconNext.Dispose();
             m_iconNext = null;

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_StoryDialogUI.cs

@@ -19,6 +19,8 @@ namespace UI.Main
         public GButton m_btnAutoPlay;
         public GButton m_btnSpeedUp;
         public GButton m_btnSkip;
+        public GTextField m_txtPlayName;
+        public GGroup m_comPlayName;
         public Transition m_t0;
         public const string URL = "ui://mfvz4q8kxuzk2i";
         public const string PACKAGE_NAME = "Main";
@@ -79,6 +81,8 @@ namespace UI.Main
             m_btnAutoPlay = (GButton)comp.GetChild("btnAutoPlay");
             m_btnSpeedUp = (GButton)comp.GetChild("btnSpeedUp");
             m_btnSkip = (GButton)comp.GetChild("btnSkip");
+            m_txtPlayName = (GTextField)comp.GetChild("txtPlayName");
+            m_comPlayName = (GGroup)comp.GetChild("comPlayName");
             m_t0 = comp.GetTransition("t0");
         }
         public void Dispose(bool disposeTarget = false)
@@ -98,6 +102,8 @@ namespace UI.Main
             m_btnAutoPlay = null;
             m_btnSpeedUp = null;
             m_btnSkip = null;
+            m_txtPlayName = null;
+            m_comPlayName = null;
             m_t0 = null;
             if(disposeTarget && target != null)
             {

+ 9 - 0
GameClient/Assets/Game/HotUpdate/Views/League/LeagueTeaPartyView.cs

@@ -86,6 +86,13 @@ namespace GFGGame
             GetRoleContainerInfos();
         }
 
+        private void UpDataTime(object param = null)
+        {
+            UpDataOverTime();
+            if (TimeInfo.Instance.ServerNow() >= LeagueDataManager.Instance.TeaPartyCloseTime)
+                Timers.inst.Remove(UpDataTime);
+        }
+
         private void UpDataOverTime()
         {
             _ui.m_txtOverTime.text = "挑战剩余时间:" + TimeUtil.GetTimeLeft(TimeInfo.Instance.ServerNow(), LeagueDataManager.Instance.TeaPartyCloseTime);
@@ -106,6 +113,7 @@ namespace GFGGame
             if (result)
             {
                 UpDataOverTime();
+                Timers.inst.Add(1f, 0, UpDataTime);
                 _ui.m_ListTeaParty.numItems = 6;
             }
         }
@@ -113,6 +121,7 @@ namespace GFGGame
         protected override void OnHide()
         {
             base.OnHide();
+            Timers.inst.Remove(UpDataTime);
         }
 
         protected override void RemoveEventListener()

+ 27 - 13
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryDialogView.cs

@@ -154,11 +154,9 @@ namespace GFGGame
                 FightDataManager.Instance.dialogSpeed = _speedAutoPlay;
             }
 
-            if (IsTeaParty) { 
+            if (IsTeaParty) {
                 _ui.m_c1.selectedIndex = 2;
-                OnClickBtnAutoPlay();
-                _speedAutoPlay = 1;
-                FightDataManager.Instance.dialogSpeed = _speedAutoPlay;
+                _autoPlay = true;
             }
 
             _ui.m_btnBack.visible = InstanceZonesDataManager.CheckLevelPass(100001001);
@@ -495,21 +493,31 @@ namespace GFGGame
             else if (!string.IsNullOrEmpty(roleName))
             {
                 _ui.m_dialogName.target.visible = true;
-                if (IsTeaParty) { 
+                if (IsTeaParty)
+                {
                     var roleContainerList = LeagueDataManager.Instance.RoleContainerList;
                     var teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(LeagueDataManager.Instance.TeaPartyId);
-
                     int roleIndex = Convert.ToInt32(roleName);
-                    string name = "";
-                    if (roleIndex <= roleContainerList.Count && roleContainerList[roleIndex - 1].MaxScoreRoleName != null && roleContainerList[roleIndex - 1].MaxScoreRoleName != "")
-                        name = roleContainerList[roleIndex - 1].MaxScoreRoleName;
-                    else
-                        name = teapartyRoleCfg[roleIndex - 1].name;
+                    _ui.m_dialogName.m_txtName.text = teapartyRoleCfg[roleIndex - 1].name;
+                    _ui.m_dialogName.m_bgType.selectedIndex = 1;
+                    _ui.m_dialogName.m_showArrow.selectedIndex = 1;
+                    
+                    if (roleIndex <= roleContainerList.Count && roleContainerList[roleIndex - 1].MaxScoreRoleName != null && roleContainerList[roleIndex - 1].MaxScoreRoleName != "" && _ui.m_dialogName.m_txtName.text != "")
+                    {
+                        _ui.m_comPlayName.visible = true;
+                        _ui.m_txtPlayName.text = roleContainerList[roleIndex - 1].MaxScoreRoleName;
 
-                    _ui.m_dialogName.m_txtName.text = name;
+                        if (_ui.m_txtPlayName.text == RoleDataManager.roleName)
+                            _ui.m_dialogName.m_bgType.selectedIndex = 0;
+                    }
+                    else 
+                        _ui.m_comPlayName.visible = false;
                 }
-                else
+                else { 
+                    _ui.m_dialogName.m_bgType.selectedIndex = 0;
+                    _ui.m_dialogName.m_showArrow.selectedIndex = 0;
                     _ui.m_dialogName.m_txtName.text = roleName;
+                }
 
                 _wordTextField = _ui.m_dialogName.m_txtContent;
                 _arrow = _ui.m_dialogName.m_iconNext;
@@ -526,10 +534,16 @@ namespace GFGGame
             }
             else
             {
+                if (IsTeaParty)
+                    _ui.m_dialogText.m_showArrow.selectedIndex = 1;
+                else
+                    _ui.m_dialogText.m_showArrow.selectedIndex = 0;
+
                 _ui.m_dialogText.target.visible = true;
                 _wordTextField = _ui.m_dialogText.m_txtContent;
                 _arrow = _ui.m_dialogText.m_iconNext;
                 lastTextFieldType = "text";
+                _ui.m_comPlayName.visible = false;
             }
             _wordList = Regex.Split(words, "&&");
             _wordIndex = 0;

BIN
GameClient/Assets/ResIn/UI/League/League_fui.bytes


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