diff options
author | chai <chaifix@163.com> | 2021-09-09 09:39:01 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-09-09 09:39:01 +0800 |
commit | 374b14af851415eb8055bb5251fb064c90f5f271 (patch) | |
tree | 20a564db3a37614c374ae5fe27285b166693bded /Assets/Scripts/Unit/Components/UnitState | |
parent | 7163529a1c092e766e26b7d7b7f7b4b71583962b (diff) |
*vfx
Diffstat (limited to 'Assets/Scripts/Unit/Components/UnitState')
-rw-r--r-- | Assets/Scripts/Unit/Components/UnitState/PCState.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Assets/Scripts/Unit/Components/UnitState/PCState.cs b/Assets/Scripts/Unit/Components/UnitState/PCState.cs index 1d0332cd..b8512d64 100644 --- a/Assets/Scripts/Unit/Components/UnitState/PCState.cs +++ b/Assets/Scripts/Unit/Components/UnitState/PCState.cs @@ -308,8 +308,9 @@ public class PCState : UnitState IEnumerator AirAttack(SkillParam param) { - int id = 0; - m_Owner.pcAnimation.AnimAirAttack(id); + int total = 5;
+ int id = 0;
+ m_Owner.pcAnimation.AnimAirAttack(id++); yield return null; // 等待animator更新 while (true) { @@ -337,8 +338,8 @@ public class PCState : UnitState { TurnAround(true); } - ++id; - m_Owner.pcAnimation.AnimAirAttack(id); + m_Owner.pcAnimation.AnimAirAttack(id++); + id %= total; yield return null; // 等待animator更新 yield return new WaitForTransitionDone(m_Owner.pcAnimation); } |