Files
PuzzleColorBall/Assets/Scripts/DestroyObjects.cs

17 lines
395 B
C#
Raw 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) {
Debug.Log("destroy wall trigger");
Destroy(other.gameObject);
}
2023-03-09 16:00:42 +01:00
private void OnCollisionEnter(Collision other) {
Debug.Log("collision enter");
Destroy(other.gameObject);
}
2023-03-09 14:07:44 +01:00
}