MiniGames/Assets/Skywalker_Blueberry.cs

17 lines
386 B
C#
Raw Normal View History

2025-09-01 00:01:33 +05:00
using UnityEngine;
public class Skywalker_Blueberry : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
// Add to player's blueberry count
Skywalker_BlueberryManager.Instance.AddBlueberry(1);
// Destroy the collected blueberry
Destroy(gameObject);
}
}
}