diff options
author | chai <chaifix@163.com> | 2021-08-30 21:11:54 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-08-30 21:11:54 +0800 |
commit | 86ec4522be1d0b932006801c7bf2297adc9f0028 (patch) | |
tree | 551739eaff15f0a1990f997409da8926979ba85a /Assets/Scripts/Unit/Component/MonsterState.cs | |
parent | 07fd372981a16672af23e30816ade14fcb744804 (diff) |
*misc
Diffstat (limited to 'Assets/Scripts/Unit/Component/MonsterState.cs')
-rw-r--r-- | Assets/Scripts/Unit/Component/MonsterState.cs | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Assets/Scripts/Unit/Component/MonsterState.cs b/Assets/Scripts/Unit/Component/MonsterState.cs index b1ff9cbd..cd2ed8e5 100644 --- a/Assets/Scripts/Unit/Component/MonsterState.cs +++ b/Assets/Scripts/Unit/Component/MonsterState.cs @@ -76,6 +76,10 @@ public class MonsterState : UnitState public struct HitLightParam { }
+ public struct HitAirParam { }
+
+ public struct RiseParam { }
+
#region Idle
IEnumerator Idle(IdleParam param)
@@ -121,6 +125,54 @@ public class MonsterState : UnitState {
}
+ #endregion
+
+ #region HitAir
+
+ IEnumerator HitAir(HitAirParam param)
+ {
+ m_Owner.monsterAnimation.AnimHitAir();
+ yield return null;
+ while (true)
+ {
+ bool reachEnd = m_Owner.monsterAnimation.layers[0].playbackNomralizedTime == 1;
+ if (reachEnd)
+ {
+ //yield return new WaitForSeconds(1f);
+ ChangeState(EUnitState.Rise, new RiseParam());
+ }
+ yield return null;
+ }
+ }
+
+ void OnHitAirExit(EUnitState nextState)
+ {
+ }
+
+ #endregion
+
+ #region Rise
+
+ IEnumerator Rise(RiseParam param)
+ {
+ m_Owner.monsterAnimation.AnimRise();
+ yield return null;
+ while (true)
+ {
+ bool reachEnd = m_Owner.monsterAnimation.layers[0].playbackNomralizedTime == 1;
+ if (reachEnd)
+ {
+ ChangeState(EUnitState.Idle, new IdleParam());
+ }
+ yield return null;
+ }
+ }
+
+ void OnRiseExit(EUnitState nextState)
+ {
+ }
+
+
#endregion
|