Animation tweak

This commit is contained in:
RochesterX
2025-02-07 17:48:41 -05:00
parent d975028d28
commit 6de83a4034
5 changed files with 14327 additions and 2 deletions

View File

@@ -15,11 +15,12 @@ public class Punch : MonoBehaviour
private void Start()
{
actions = GetComponent<PlayerInput>().actions;
cancelable = true;
}
private void Update()
{
if (actions.FindAction("Punch").ReadValue<float>() == 1f)
if (actions.FindAction("Punch").WasPressedThisFrame())
{
if (!cancelable) return;
GetComponent<AnimationPlayer>().Punch();