diff --git a/Assets/JAY/Scripts/PlayerAction/PlayerActionAttack.cs b/Assets/JAY/Scripts/PlayerAction/PlayerActionAttack.cs index 9256970b..154d9f60 100644 --- a/Assets/JAY/Scripts/PlayerAction/PlayerActionAttack.cs +++ b/Assets/JAY/Scripts/PlayerAction/PlayerActionAttack.cs @@ -57,6 +57,8 @@ public class PlayerActionAttack : IPlayerAction { public void EndAction() { if (player == null) return; + player.WeaponController.AttackEnd(); + player.SafeSetBool("Attack", false); IsActive = false; player.OnActionEnded(this); @@ -70,6 +72,8 @@ public class PlayerActionAttack : IPlayerAction { var weapon = player.GetComponentInChildren(); weapon?.SetComboStep(step); + + player.WeaponController.AttackStart(); } public void OnComboInput() { diff --git a/Assets/JAY/Scripts/PlayerController.cs b/Assets/JAY/Scripts/PlayerController.cs index 2ca2f45b..b3720cfe 100644 --- a/Assets/JAY/Scripts/PlayerController.cs +++ b/Assets/JAY/Scripts/PlayerController.cs @@ -24,7 +24,8 @@ public class PlayerController : CharacterBase, IObserver private bool _isBattle; private GameObject weapon; private WeaponController _weaponController; - + public WeaponController WeaponController => _weaponController; + private IPlayerState _currentStateClass { get; set; } private IPlayerAction _currentAction; public IPlayerAction CurrentAction => _currentAction;