2025-08-30 22:59:11 +05:00
|
|
|
// RewardsChuteCollector.cs
|
|
|
|
using UnityEngine;
|
|
|
|
using DG.Tweening;
|
|
|
|
public class RewardsChuteCollector : MonoBehaviour
|
|
|
|
{
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
|
|
{
|
|
|
|
var cb = other.GetComponentInParent<ClawBubble>();
|
|
|
|
if (cb == null) return;
|
|
|
|
|
|
|
|
// Score it
|
|
|
|
if (ClawScoreManager.Instance != null)
|
|
|
|
ClawScoreManager.Instance.EvaluateBubble(cb.type);
|
|
|
|
|
|
|
|
// Tell spawner to react (new bubbles / trap logic)
|
2025-09-06 00:08:22 +05:00
|
|
|
//if (ClawBubbleSpawner.Instance != null)
|
|
|
|
// ClawBubbleSpawner.Instance.NotifyBubbleGrabbed(cb.type);
|
2025-08-30 22:59:11 +05:00
|
|
|
|
|
|
|
cb.transform.DOScale(0.5f,0.5f);
|
|
|
|
// Remove the collected bubble
|
|
|
|
//Destroy(cb.gameObject);
|
|
|
|
}
|
|
|
|
}
|