Răsfoiți Sursa

战斗词牌出现有报错,调整参数传递

zhangyuqian 1 an în urmă
părinte
comite
11d7031fe6

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

@@ -17,10 +17,8 @@ namespace UI.Main
         public GComponent m_myHead;
         public GComponent m_targetHead;
         public GGraph m_effReduceScore;
-        public GTextField m_reduceTxt;
         public Transition m_t1;
         public Transition m_t2;
-        public Transition m_t3;
         public const string URL = "ui://mfvz4q8k8xpg3w";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "StoryFightTargetScoreUI";
@@ -78,10 +76,8 @@ namespace UI.Main
             m_myHead = (GComponent)comp.GetChild("myHead");
             m_targetHead = (GComponent)comp.GetChild("targetHead");
             m_effReduceScore = (GGraph)comp.GetChild("effReduceScore");
-            m_reduceTxt = (GTextField)comp.GetChild("reduceTxt");
             m_t1 = comp.GetTransition("t1");
             m_t2 = comp.GetTransition("t2");
-            m_t3 = comp.GetTransition("t3");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -99,10 +95,8 @@ namespace UI.Main
             m_myHead = null;
             m_targetHead = null;
             m_effReduceScore = null;
-            m_reduceTxt = null;
             m_t1 = null;
             m_t2 = null;
-            m_t3 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

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

@@ -10,8 +10,10 @@ namespace UI.Main
         public GImage m_bg;
         public UI_ComSkillShow m_comSkillShow;
         public GGraph m_effReduceScore;
+        public GTextField m_reduceTxt;
         public Transition m_t1;
         public Transition m_t2;
+        public Transition m_t3;
         public const string URL = "ui://mfvz4q8kpy009l";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "StorySkillUI";
@@ -62,8 +64,10 @@ namespace UI.Main
             m_bg = (GImage)comp.GetChild("bg");
             m_comSkillShow = (UI_ComSkillShow)UI_ComSkillShow.Create(comp.GetChild("comSkillShow"));
             m_effReduceScore = (GGraph)comp.GetChild("effReduceScore");
+            m_reduceTxt = (GTextField)comp.GetChild("reduceTxt");
             m_t1 = comp.GetTransition("t1");
             m_t2 = comp.GetTransition("t2");
+            m_t3 = comp.GetTransition("t3");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -71,8 +75,10 @@ namespace UI.Main
             m_comSkillShow.Dispose();
             m_comSkillShow = null;
             m_effReduceScore = null;
+            m_reduceTxt = null;
             m_t1 = null;
             m_t2 = null;
+            m_t3 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

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

@@ -210,7 +210,7 @@ namespace GFGGame
             if (_showCard)
             {
                
-                ViewManager.Show<StorySkillView>(new object[] { skillsToShowDic ,null });
+                ViewManager.Show<StorySkillView>(skillsToShowDic);
                 //这里可以写卡牌加分
                 _score += _skillScore;
                 Timers.inst.Add(2.0f, 1, UpdateProgressA);

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

@@ -271,8 +271,7 @@ namespace GFGGame
             List<PassivitySkillLvlCfg> vaildSkills = ScoreSystemData.Instance.GetValidSkills(_currentTime, _partId, roleData.cardId, roleData.skillLvs, 0, null, roundTimes, new List<int>());
             if (showCard)
             {
-                _ui.m_reduceTxt.SetVar("value", _targetSkillScore.ToString()).FlushVars();
-                ViewManager.Show<StorySkillView>(new object[] { skillScoreDic, _ui.m_t3});
+                ViewManager.Show<StorySkillView>(skillScoreDic);
                 _score += _skillScore;
                 _targetScore += _targetSkillScore;
                 _skillScore = 0;

+ 4 - 13
GameClient/Assets/Game/HotUpdate/Views/MainStory/StorySkillView.cs

@@ -16,7 +16,6 @@ namespace GFGGame
         private EffectUI _effectUI3;
         private EffectUI _effectUI4;
         private EffectUI _effectUI5;
-        private Transition m_ReduceTxt;
 
         private bool isFirst;
         private GameObject mainCamera;
@@ -64,13 +63,8 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-            skillScoreDic = (this.viewData as object[])[0] as Dictionary<int, int>;
-            if ((this.viewData as object[])[1] != null)
-            {
-                m_ReduceTxt = (this.viewData as object[])[1] as Transition;
-            }
-            
-            
+            skillScoreDic = this.viewData as Dictionary<int, int>;
+
             UpdateView();
         }
         private void UpdateView()
@@ -91,6 +85,7 @@ namespace GFGGame
                 _ui.m_comSkillShow.m_ComSkillScore.m_c1.selectedIndex = skillScoreDic[skillId] >= 0 ? 0 : 1;
 
                 _ui.m_comSkillShow.m_SkillScore.SetVar("value", skillScoreDic[skillId].ToString()).FlushVars();
+                _ui.m_reduceTxt.SetVar("value", skillScoreDic[skillId].ToString()).FlushVars();
 
                 string res = skillCfg.res;
 
@@ -150,11 +145,7 @@ namespace GFGGame
         private void SetEffReduceScore(object param)
         {
             _ui.m_effReduceScore.visible = true;
-            if (m_ReduceTxt != null)
-            { 
-                m_ReduceTxt.Play();
-            }
-            
+            _ui.m_t3.Play();   
         }
         
         private void SetEffVisible(object param)

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