2026-03-20 : 8방향 대시

This commit is contained in:
2026-03-20 02:57:53 +09:00
parent 086034de23
commit 4c0c1b6b41
74 changed files with 10009 additions and 304 deletions

View File

@@ -1 +1 @@
public enum PlayerState { Idle, Walk, Run, Dodge, Jump, Fall, Attack, Charge, Hit, Dead, None }
public enum PlayerState { Idle, Walk, Run, Dodge, Jump, Fall, Attack, Charge, Hit, Dead, Inertia, None }

View File

@@ -57,13 +57,13 @@ public void SetMaxJumpCount(int maxCount)
#region
//지상 이동이 가능한가?
public bool CanMove() => IsGrounded && !IsMoveCut && (CurrentState == PlayerState.Idle || CurrentState == PlayerState.Walk || CurrentState == PlayerState.Run);
public bool CanMove() => IsGrounded && !IsMoveCut && (CurrentState == PlayerState.Idle || CurrentState == PlayerState.Walk || CurrentState == PlayerState.Run) && (CurrentState != PlayerState.Inertia);
//점프가 가능한 상태인가?
public bool CanJump()
{
bool jumpAlreadyMax = (_maxJumpCount <= _jumpCount);
return IsGrounded && !IsMoveCut && !jumpAlreadyMax && (CurrentState == PlayerState.Idle || CurrentState == PlayerState.Walk || CurrentState == PlayerState.Run);
return IsGrounded && !IsMoveCut && !jumpAlreadyMax && (CurrentState == PlayerState.Idle || CurrentState == PlayerState.Walk || CurrentState == PlayerState.Run) && (CurrentState != PlayerState.Inertia);
}
//대쉬가 가능한 상태인가?
public bool CanDodge()
@@ -78,6 +78,7 @@ public bool CanDodge()
if (CurrentState == PlayerState.Hit || CurrentState == PlayerState.Dead) return false;
if (IsMoveCut) return false;
if (CurrentState == PlayerState.Inertia) return false;
// 스태미나 시스템이 있다면 체크
// if (CurrentStamina < DodgeCost) return false;
@@ -85,7 +86,7 @@ public bool CanDodge()
return true;
}
//공중에서 조작 가능한 상태인가?
public bool CanControlInAir() => !IsGrounded && !IsMoveCut && (CurrentState == PlayerState.Jump || CurrentState == PlayerState.Fall);
public bool CanControlInAir() => !IsGrounded && !IsMoveCut && (CurrentState == PlayerState.Jump || CurrentState == PlayerState.Fall) && (CurrentState != PlayerState.Inertia);
//공격이 가능한 상태인가?
public bool CanAttack()
{
@@ -97,6 +98,9 @@ public bool CanAttack()
if (CurrentState == PlayerState.Hit || CurrentState == PlayerState.Dead)
return false;
if (CurrentState == PlayerState.Dodge || CurrentState == PlayerState.Inertia)
return false;
// (Idle, Walk, Run, Jump, Fall 상태에서 공격 가능)
return true;
}