using UnityEngine; using System.Collections; public class CubeClash_Blueberry : MonoBehaviour { public float buffDuration = 5f; public float distanceBoost = 1.5f; // increase dash distance public float speedBoost = 1.5f; // increase dash speed public float cooldownReduction = 0.5f; private void OnTriggerEnter(Collider other) { CubeClash_ZibuController zibu = other.GetComponent(); if (zibu) { StartCoroutine(ApplyBuff(zibu)); Destroy(gameObject); } } private IEnumerator ApplyBuff(CubeClash_ZibuController zibu) { // Apply buffs zibu.bumpDistance *= distanceBoost; zibu.bumpSpeed *= speedBoost; zibu.cooldown *= cooldownReduction; yield return new WaitForSeconds(buffDuration); // Revert buffs zibu.bumpDistance /= distanceBoost; zibu.bumpSpeed /= speedBoost; zibu.cooldown /= cooldownReduction; } }