Files
PuzzleColorBall/Assets/Scripts/DestroyObjects.cs

17 lines
399 B
C#
Raw Permalink Normal View History

2023-03-09 14:07:44 +01:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DestroyObjects : MonoBehaviour
{
private void OnTriggerEnter(Collider other) {
2023-03-20 19:56:27 +01:00
//Debug.Log("destroy wall trigger");
2023-03-09 14:07:44 +01:00
Destroy(other.gameObject);
}
2023-03-09 16:00:42 +01:00
private void OnCollisionEnter(Collision other) {
2023-03-20 19:56:27 +01:00
//Debug.Log("collision enter");
2023-03-09 16:00:42 +01:00
Destroy(other.gameObject);
}
2023-03-09 14:07:44 +01:00
}