using UnityEngine;

public class InputManager : MonoBehaviour
{
    public GrenadeLauncher grenadeLauncher;

    void Update()
    {
        HandleGrenadeLaunchInput();
    }

    private void HandleGrenadeLaunchInput()
    {
        if (!grenadeLauncher)
        {
            Debug.LogWarning("Grenade Launcher reference not set in Input Manager.");
            return;
        }

        if (Input.GetButtonDown("Fire1"))
        {
            grenadeLauncher.FireGrenade();
        }
    }
}