18 lines
510 B
C#
18 lines
510 B
C#
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);
|
|
if (Skywalker_GameManager.Instance != null)
|
|
Skywalker_GameManager.Instance.PulseBlueberryGlow();
|
|
// Destroy the collected blueberry
|
|
Destroy(gameObject);
|
|
}
|
|
}
|
|
}
|