using UnityEngine;

public class PlayerAnimationController : MonoBehaviour
{
    private Animator animator;

    private void Awake()
    {
        animator = GetComponent<Animator>();
    }

    public void SetAnimationState(string state)
    {
        animator.Play(state);
    }

    public void UpdateAnimation(float speed)
    {
        animator.SetFloat("Speed", speed);
    }

    public void TriggerJump()
    {
        animator.SetTrigger("Jump");
    }

    public void TriggerAttack()
    {
        animator.SetTrigger("Attack");
    }
}