فهرست منبع

战斗词牌特效加速问题

zhangyuqian 1 سال پیش
والد
کامیت
9bb0fdb4e7

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

@@ -11,9 +11,13 @@ namespace UI.Main
         public UI_ComSkillShow m_comSkillShow;
         public GGraph m_effReduceScore;
         public GTextField m_reduceTxt;
+        public GGraph m_addScore;
+        public GGraph m_reduceScore;
+        public GTextField m_SkillScore;
         public Transition m_t1;
         public Transition m_t2;
         public Transition m_t3;
+        public Transition m_t4;
         public const string URL = "ui://mfvz4q8kpy009l";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "StorySkillUI";
@@ -65,9 +69,13 @@ namespace UI.Main
             m_comSkillShow = (UI_ComSkillShow)UI_ComSkillShow.Create(comp.GetChild("comSkillShow"));
             m_effReduceScore = (GGraph)comp.GetChild("effReduceScore");
             m_reduceTxt = (GTextField)comp.GetChild("reduceTxt");
+            m_addScore = (GGraph)comp.GetChild("addScore");
+            m_reduceScore = (GGraph)comp.GetChild("reduceScore");
+            m_SkillScore = (GTextField)comp.GetChild("SkillScore");
             m_t1 = comp.GetTransition("t1");
             m_t2 = comp.GetTransition("t2");
             m_t3 = comp.GetTransition("t3");
+            m_t4 = comp.GetTransition("t4");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -76,9 +84,13 @@ namespace UI.Main
             m_comSkillShow = null;
             m_effReduceScore = null;
             m_reduceTxt = null;
+            m_addScore = null;
+            m_reduceScore = null;
+            m_SkillScore = null;
             m_t1 = null;
             m_t2 = null;
             m_t3 = null;
+            m_t4 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 4 - 0
GameClient/Assets/Game/HotUpdate/ShakeCamera/SC_shakeCamera.cs

@@ -62,6 +62,10 @@ public class SC_shakeCamera : MonoBehaviour
 						cam.rect = new Rect(shakeDelta * (-1.0f + shakeINT * Random.value), shakeDelta * (-1.0f + shakeINT * Random.value), 1.0f, 1.0f);
 
                     }
+                    else
+                    {
+                        cam.rect = new Rect(0.0f, 0.0f, 1.0f, 1.0f);
+                    }
                 }
             }
         }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ShakeCamera/shakecameraControl.cs

@@ -7,7 +7,7 @@ public class shakecameraControl : MonoBehaviour {
     private float time=0f;
     public float StartTime = 0.7f;
     private float Time0;
-    public float shaketime = 0.3f;
+    public float shaketime = 0.2f;
 	public float shakeInt;
     public bool end = false;
 

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

@@ -207,7 +207,7 @@ namespace GFGGame
             List<PassivitySkillLvlCfg> vaildSkills = ScoreSystemData.Instance.GetValidSkills(_currentTime, _partId, roleData.cardId, roleData.skillLvs, 0, null, roundTimes, new List<int>());
             ScoreSystemData.Instance.GetRoundItemSkillScore(vaildSkills, _mainScore, 0, out _skillScore, out int _targetScore, out Dictionary<int, int> skillsToShowDic);
             bool _showCard = ScoreSystemData.Instance.IsShowCard(InstanceZonesDataManager.currentCardId, vaildSkills);
-            if (_showCard)
+            if (_showCard && skillsToShowDic.Count > 0)
             {
                
                 ViewManager.Show<StorySkillView>(skillsToShowDic);

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

@@ -269,7 +269,7 @@ namespace GFGGame
         {
             List<int> roundTimes = ScoreSystemData.Instance.GetRoundTime(roleData.cardId, roleData.skillLvs);
             List<PassivitySkillLvlCfg> vaildSkills = ScoreSystemData.Instance.GetValidSkills(_currentTime, _partId, roleData.cardId, roleData.skillLvs, 0, null, roundTimes, new List<int>());
-            if (showCard)
+            if (showCard && skillScoreDic.Count > 0)
             {
                 ViewManager.Show<StorySkillView>(skillScoreDic);
                 _score += _skillScore;

+ 24 - 16
GameClient/Assets/Game/HotUpdate/Views/MainStory/StorySkillView.cs

@@ -49,8 +49,8 @@ namespace GFGGame
             // this.modal = false;
             //_effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_comSkillShow.m_holderBottom, "ui_fight_new", "CFKP_TX_down");
             //_effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_comSkillShow.m_holderTop, "ui_fight_new", "CFKP_TX_up");
-            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_comSkillShow.m_addScore, "ui_fight_new", "CFKP_UP");
-            _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_comSkillShow.m_reduceScore, "ui_fight_new", "CFKP_Down");
+            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_addScore, "ui_fight_new", "CFKP_UP");
+            _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_reduceScore, "ui_fight_new", "CFKP_Down");
             _effectUI5 = EffectUIPool.CreateEffectUI(_ui.m_effReduceScore, "ui_fight_new", "CFKP_Down_end");
 
             _ui.m_comSkillShow.m_t0.ignoreEngineTimeScale = false;
@@ -65,6 +65,7 @@ namespace GFGGame
             base.OnShown();
             skillScoreDic = this.viewData as Dictionary<int, int>;
             _ui.m_effReduceScore.visible = false;
+            _ui.m_addScore.visible = false;
             UpdateView();
         }
         private void UpdateView()
@@ -84,7 +85,7 @@ namespace GFGGame
                 _ui.m_comSkillShow.m_ComSkillScore.m_txtCount1.SetVar("value", Math.Abs(skillScoreDic[skillId]).ToString()).FlushVars();
                 _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_SkillScore.SetVar("value", skillScoreDic[skillId].ToString()).FlushVars();
                 _ui.m_reduceTxt.SetVar("value", skillScoreDic[skillId].ToString()).FlushVars();
 
                 string res = skillCfg.res;
@@ -118,16 +119,17 @@ namespace GFGGame
                 //战斗卡牌特效处理
                 Timers.inst.Add(0.5f, 1, SetEffVisible);
             }
-            else
+            //else
             {
-                this.Hide();
+                //this.Hide();
+                Timers.inst.Add(1.8f, 1, AutoHide);
             }
         }
         protected override void OnHide()
         {
             base.OnHide();
-                _ui.m_comSkillShow.m_addScore.visible = false;
-                _ui.m_comSkillShow.m_reduceScore.visible = false;
+                _ui.m_addScore.visible = false;
+                _ui.m_reduceScore.visible = false;
                 if (_ui.m_effReduceScore != null)
                 {
                     _ui.m_effReduceScore.visible = false;
@@ -135,6 +137,7 @@ namespace GFGGame
             SetCamera(false);
             Timers.inst.Remove(SetEffReduceScore);
             Timers.inst.Remove(SetEffVisible);
+			Timers.inst.Remove(AutoHide);
             _ui.m_comSkillShow.m_t0.Stop(true, false);
             _ui.m_comSkillShow.m_t1.Stop(true, false);
             _ui.m_t1.Stop(true, false);
@@ -163,19 +166,19 @@ namespace GFGGame
             //战斗卡牌特效处理
             if (skillScoreDic[skillId] > 0)
             {
-                _ui.m_comSkillShow.m_SkillScore.color = new Color(0.973f, 0.784f, 0.431f, 1.000f);
-                _ui.m_comSkillShow.m_reduceScore.visible = false;
-                _ui.m_comSkillShow.m_addScore.visible = true;
-                _ui.m_comSkillShow.m_SkillScore.visible = true;
-                _ui.m_comSkillShow.m_t2.Play();
+                _ui.m_SkillScore.color = new Color(0.973f, 0.784f, 0.431f, 1.000f);
+                _ui.m_reduceScore.visible = false;
+                _ui.m_addScore.visible = true;
+                _ui.m_SkillScore.visible = true;
+                _ui.m_t4.Play();
                 SetCamera(true);
             }
             else if (skillScoreDic[skillId] < 0)
             {
-                _ui.m_comSkillShow.m_SkillScore.color = new Color(0.906f, 0.894f, 0.894f, 1.000f);
-                _ui.m_comSkillShow.m_addScore.visible = false;
-                _ui.m_comSkillShow.m_reduceScore.visible = true;
-                _ui.m_comSkillShow.m_SkillScore.visible = false;
+                _ui.m_SkillScore.color = new Color(0.906f, 0.894f, 0.894f, 1.000f);
+                _ui.m_addScore.visible = false;
+                _ui.m_reduceScore.visible = true;
+                _ui.m_SkillScore.visible = false;
                 Timers.inst.Add(1.5f, 1, SetEffReduceScore);
             }
         }
@@ -212,5 +215,10 @@ namespace GFGGame
             }
 
         }
+
+        private void AutoHide(object param = null)
+        {
+            this.Hide();
+        }
     }
 }

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