using UnityEngine;
using System.Collections;

public class ColliderManager : MonoBehaviour {

	Collider2D activeCollider;
	public Collider2D[] colliders; 

	public Collider2D SetCollider(string name)
	{
		if(activeCollider != null)
		{
			activeCollider.gameObject.SetActive(false);
		}

		for(int i= 0; i < colliders.Length; i++)
		{
			if(colliders[i].name.Equals(name))
			{
				activeCollider = colliders[i];
				colliders[i].gameObject.SetActive(true);
				return colliders[i];
			}
		}
		Debug.LogError("No Collider Found");
		return null;

	}

}
