From 02893fd92272a29ec5e1c0de6ea1fe04f8cd0953 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期一, 20 五月 2019 20:50:39 +0800
Subject: [PATCH] 3627 【2.0】飞跃点距离较近时表现优化

---
 Core/SFX/SFXController.cs                   |    3 +++
 Fight/Stage/MapEditor/Game/TransferGroup.cs |   13 +++++++++++++
 Fight/Actor/State/SMB/STM_BaseAttack.cs     |    2 ++
 Core/SFX/SFXPlayUtility.cs                  |    1 +
 4 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/Core/SFX/SFXController.cs b/Core/SFX/SFXController.cs
index ccdc944..f812b6a 100644
--- a/Core/SFX/SFXController.cs
+++ b/Core/SFX/SFXController.cs
@@ -174,7 +174,10 @@
                 }
             }
         }
+    }
 
+    public void SetPaticleSystemSpeed(float speed)
+    {
         if (m_CacheParticleSystem != null)
         {
             ParticleSystem.MainModule _mainModule;
diff --git a/Core/SFX/SFXPlayUtility.cs b/Core/SFX/SFXPlayUtility.cs
index a7d279f..64c8713 100644
--- a/Core/SFX/SFXPlayUtility.cs
+++ b/Core/SFX/SFXPlayUtility.cs
@@ -278,6 +278,7 @@
         }
 
         sfx.SetAnimatorSpeed(1);
+        sfx.SetPaticleSystemSpeed(1);
         _pool.Release(sfx);
     }
 
diff --git a/Fight/Actor/State/SMB/STM_BaseAttack.cs b/Fight/Actor/State/SMB/STM_BaseAttack.cs
index 34356f6..5f185a5 100644
--- a/Fight/Actor/State/SMB/STM_BaseAttack.cs
+++ b/Fight/Actor/State/SMB/STM_BaseAttack.cs
@@ -332,6 +332,7 @@
         for (int i = 0; i < m_CastedEffect.Count; ++i)
         {
             m_CastedEffect[i].SetAnimatorSpeed(speed);
+            m_CastedEffect[i].SetPaticleSystemSpeed(speed);
         }
     }
 
@@ -1017,6 +1018,7 @@
         if (_controller)
         {
             _controller.SetAnimatorSpeed(m_EffectAnimatorSpeed);
+            _controller.SetPaticleSystemSpeed(m_EffectAnimatorSpeed);
             m_CastedEffect.Add(_controller);
         }
     }
diff --git a/Fight/Stage/MapEditor/Game/TransferGroup.cs b/Fight/Stage/MapEditor/Game/TransferGroup.cs
index f7a2ae6..f95865f 100644
--- a/Fight/Stage/MapEditor/Game/TransferGroup.cs
+++ b/Fight/Stage/MapEditor/Game/TransferGroup.cs
@@ -124,6 +124,17 @@
                         _pkg.MoveType = 0;
                         GameNetSystem.Instance.SendInfo(_pkg);
                         m_FlyingEffect = SFXPlayUtility.Instance.PlayBattleEffect(1180, _hero);
+                        var _scaleTime = 1f;
+                        if (isPositive)
+                        {
+                            _scaleTime = m_Data.transferPoints[targetPoint - 1].flyTimeFront / 2;
+                        }
+                        else
+                        {
+                            _scaleTime = m_Data.transferPoints[targetPoint + 1].flyTimeBack / 2;
+                        }
+                        m_FlyingEffect.SetAnimatorSpeed(1 / _scaleTime);
+                        m_FlyingEffect.SetPaticleSystemSpeed(_scaleTime);
                         GA_Hero.s_MapSwitching = true;
                         m_Step = 2;
                         if (isPositive)
@@ -134,6 +145,7 @@
                         {
                             _hero.Play(Animator.StringToHash(m_Data.transferPoints[targetPoint + 1].stateNameBack));
                         }
+                        _hero.SetAnimatorSpeed(1 / _scaleTime);
                         _hero.Idle();
                         CameraController.Instance.LookAtTarget = _hero.Root.GetChildTransformDeeply("Bip001");
                     }
@@ -194,6 +206,7 @@
                     {
                         m_Step = 3;
                         GA_Hero.s_MapSwitching = false;
+                        _hero.SetAnimatorSpeed(1);
                         if (m_FlyingEffect)
                         {
                             SFXPlayUtility.Instance.Release(m_FlyingEffect);

--
Gitblit v1.8.0