|
|
@@ -6,7 +6,7 @@ public class chargeDownward : MonoBehaviour
|
|
|
{
|
|
|
// ״̬ö¾Ù
|
|
|
public enum MovementState { Idle,Finding, Dashing, Breaking, Rising }
|
|
|
- private MovementState currentState = MovementState.Idle;
|
|
|
+ public MovementState currentState = MovementState.Idle;
|
|
|
|
|
|
public Enemy owner;
|
|
|
private AttackController attackController;
|
|
|
@@ -76,7 +76,7 @@ public class chargeDownward : MonoBehaviour
|
|
|
{
|
|
|
if (owner.state != CharacterState.Attack)
|
|
|
{
|
|
|
- StopAllMovements();
|
|
|
+ //StopAllMovements();
|
|
|
if (owner.state == CharacterState.Rise)
|
|
|
{
|
|
|
rb.useGravity = false;
|
|
|
@@ -106,7 +106,7 @@ public class chargeDownward : MonoBehaviour
|
|
|
StartDash();
|
|
|
currentState = MovementState.Dashing;
|
|
|
}
|
|
|
- else if (!canDash && !attackController.isAttackTriggerOn)
|
|
|
+ else if (!canDash && !attackController.isAttackTriggerOn && !isBreaking)
|
|
|
{
|
|
|
StartRise();
|
|
|
currentState = MovementState.Rising;
|
|
|
@@ -262,12 +262,12 @@ public class chargeDownward : MonoBehaviour
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- public void StopAllMovements()
|
|
|
- {
|
|
|
- IsDashing = false;
|
|
|
- isBreaking = false;
|
|
|
- currentState = MovementState.Idle;
|
|
|
- }
|
|
|
+ //public void StopAllMovements()
|
|
|
+ //{
|
|
|
+ // IsDashing = false;
|
|
|
+ // isBreaking = false;
|
|
|
+ // currentState = MovementState.Idle;
|
|
|
+ //}
|
|
|
|
|
|
private bool IsGrounded()
|
|
|
{
|