using System; using UnityEngine; public class SlotMachineHandler : MonoBehaviour { public event Action onUseSlotMachine; private void OnTriggerEnter(Collider other) { SlotMachine machine = other.GetComponentInParent(); if (machine != null) { this.onUseSlotMachine?.Invoke(machine); } } }