using UnityEngine;
using System.Collections;

public class Door : MonoBehaviour {

	public bool isOpen = false;
	public float movement = 1f;

	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		if(!isOpen){
			movement = Mathf.Lerp(movement,1,0.3f);
			transform.localScale = new Vector3(1,movement,1);
		}
		else{
			movement = Mathf.Lerp(movement,0,0.3f);
			transform.localScale = new Vector3(1,movement,1);
		}
	}
}
