19 lines
384 B
C#
Raw Normal View History

2025-07-30 01:38:12 +05:00
using UnityEngine;
public class ChaseCoin : MonoBehaviour
{
public int coinValue = 1;
void OnTriggerEnter(Collider other)
{
Debug.Log("ChaseCoin0");
if (other.CompareTag("Player"))
{
Debug.Log("ChaseCoin");
FindObjectOfType<ChaseScoreManager>().AddScore(coinValue);
Destroy(gameObject);
}
}
}