17 lines
331 B
C#
17 lines
331 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
public class SlotMachineHandler : MonoBehaviour
|
|
{
|
|
public event Action<SlotMachine> onUseSlotMachine;
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
SlotMachine machine = other.GetComponentInParent<SlotMachine>();
|
|
if (machine != null)
|
|
{
|
|
this.onUseSlotMachine?.Invoke(machine);
|
|
}
|
|
}
|
|
}
|