using UnityEngine;
using System.Collections;

public class Door : Interactiable {

	Transform ot;
	bool open;

	void Start () {
		ot = transform;
		open = false;
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	public override void Use() {
		base.Use();
		if (open) {
			transform.eulerAngles = new Vector3(ot.eulerAngles.x, ot.eulerAngles.y - 90, ot.eulerAngles.z);
			open = false;
			print("close");
		}
		else {
			transform.eulerAngles = new Vector3(ot.eulerAngles.x, ot.eulerAngles.y + 90, ot.eulerAngles.z);
			open = true;
			print("open");
		}
	}
}
