MiniGames/Assets/CubeClash_Water.cs
2025-09-01 05:03:00 +05:00

21 lines
497 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CubeClash_Water : MonoBehaviour
{
private void OnTriggerEnter(Collider other)
{
if(other.GetComponent<CubeClash_ZibuController>() != null)
{
StartCoroutine(Destroyer(other.gameObject));
}
}
IEnumerator Destroyer(GameObject obj)
{
yield return new WaitForSeconds(1);
Debug.Log("Destroying: "+obj.name);
Destroy(obj);
}
}