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

public class SwitchOpen : MonoBehaviour {

    public GameObject thingToOpen;

    void OnTriggerEnter(Collider col)
    {
        thingToOpen.GetComponent<Collider>().enabled = false;
        thingToOpen.GetComponent<Renderer>().enabled = false;
    }

    void OnTriggerExit(Collider col)
    {
        thingToOpen.GetComponent<Collider>().enabled = true;
        thingToOpen.GetComponent<Renderer>().enabled = true;
    }
}
