smart-interactive-display/Assets/GadGame/Scripts/MiniGame/Basket.cs

15 lines
296 B
C#
Raw Normal View History

2024-04-15 04:10:00 -07:00
using UnityEngine;
namespace GadGame.MiniGame
{
public class Basket : MonoBehaviour
{
private void OnTriggerEnter2D(Collider2D other)
{
if (other.TryGetComponent(out ICollect item))
{
item.Collect();
}
}
}
}