diff options
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
|