17 lines
386 B
C#
17 lines
386 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);
|
||
|
|
||
|
// Destroy the collected blueberry
|
||
|
Destroy(gameObject);
|
||
|
}
|
||
|
}
|
||
|
}
|