添加教堂

This commit is contained in:
2025-11-08 21:47:22 +09:00
parent 14886090c8
commit e421e3af70
640 changed files with 34608 additions and 913 deletions

View File

@@ -0,0 +1,24 @@
using System;
using UnityEngine;
[RequireComponent(typeof(Collider))]
public class CollectableItem : MonoBehaviour
{
[SerializeField]
private string _collectorTag;
[SerializeField]
private int _itemID;
public int ItemID => _itemID;
public event EventHandler OnCollected;
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag(_collectorTag))
{
OnCollected?.Invoke(this, EventArgs.Empty);
}
}
}