Script reorganization and UseItem created

This commit is contained in:
djkellerman
2025-02-28 13:49:02 -05:00
parent b21efcd1eb
commit f1d9006c94
11 changed files with 138 additions and 137 deletions

View File

@@ -6,6 +6,7 @@ using UnityEngine.InputSystem;
public class Punch : MonoBehaviour
{
public bool cancelable = true;
public static event System.Action<GameObject> OnPlayerPunched;
[SerializeField] private BoxCollider2D hurtbox;
@@ -30,6 +31,7 @@ public class Punch : MonoBehaviour
GetComponent<AnimationPlayer>().Punch();
DisableCancellation();
GetComponent<PlayerMovement>().maxSpeedOverride = 1f;
OnPlayerPunched?.Invoke(gameObject);
}
public void EnableHurtbox()