2025-08-19 16:59:43 +05:00

18 lines
347 B
C#

using UnityEngine;
public class ChaseCoin : MonoBehaviour
{
public int coinValue = 1;
void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
Debug.Log("ChaseCoin");
FindObjectOfType<ChaseScoreManager>().AddScore(coinValue);
Destroy(gameObject);
}
}
}