using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class destory : MonoBehaviour {
	public float  Timer ;
	public float CD_Timer =3;


	void Start () {
	 Timer = 0;
	}
	

	void Update () {
		Timer += Time.deltaTime;
		if (Timer >= CD_Timer) {
			Destroy (this.gameObject);

		}
		
	}

	/*void OnCollisionEnter(Collision col){
		if(col.gameObject.tag=="wall"){
			Destroy (this.gameObject);
		}*/
		void OnTriggerEnter(Collider col){
			if(col.gameObject.tag=="wall"){
				Destroy (this.gameObject);
			}
		


	}

}
