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

public class RouterCheck : MonoBehaviour {
	public int countObj = 0;
	// Use this for initialization
	void OnTriggerEnter2D(Collider2D other)
	{

			if (other.tag == "Router" || other.tag == "Break" ) {
				countObj++;

			}
	}

	public void UpdateCollider() {

		this.gameObject.SetActive (false);
		this.gameObject.SetActive (true);
		countObj = 0;
	}

	void OnTriggerStay2D(Collider2D other) {

		if (other.tag.Contains ("Router") && countObj == 1) {
			//Destroy (other.gameObject);

			//// 
		}
	}


}
