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

public class Porta_Controle : MonoBehaviour {

    public GameObject door;

	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}

    void OnTriggerEnter(Collider other)
    { 
        door.GetComponent<Animation>().Play("Cube|Open");
    }

    void OnTriggerExit(Collider other)
    {
        door.GetComponent<Animation>().Play("Cube|Close");
    }
}
