17 lines
223 B
C#
17 lines
223 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
public class Item : MonoBehaviour
|
|
{
|
|
public event Action<Item> Triggered;
|
|
|
|
public bool isTarget;
|
|
|
|
public void OnMouseDown()
|
|
{
|
|
if (Triggered != null)
|
|
{
|
|
Triggered(this);
|
|
}
|
|
}
|
|
} |