using NaughtyAttributes;
using Station46.Scripts;
using UnityEngine;

namespace Station46.Modules.Laser.Scripts
{
    public class LaserButtonEmitter : LaserEmitter
    {
        [BoxGroup("Internal")] [SerializeField] private Button button;
        
        protected override void Awake()
        {
            base.Awake();

            button.ButtonEvent += (_, type) => laser.firing = type == ButtonEventType.Pressed;
        }
    }
}