MiniGames/Assets/Scripts/ClawGrab/RewardsChuteCollector.cs

24 lines
700 B
C#
Raw Normal View History

// 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);
cb.transform.DOScale(0.5f,0.5f);
// Remove the collected bubble
//Destroy(cb.gameObject);
}
}