CubeArea.cs 318 B

12345678910111213141516171819202122
  1. using UnityEngine;
  2. using System.Collections;
  3. public class CubeArea : MonoBehaviour {
  4. // Use this for initialization
  5. void Start () {
  6. }
  7. // Update is called once per frame
  8. void Update () {
  9. }
  10. void OnTriggerEnter(Collider other) {
  11. if (other.CompareTag("Explosion")) {
  12. Destroy (gameObject);
  13. }}
  14. }