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

public class ExitBarrier : MonoBehaviour
{

    private float closedZRotation;

    public void Start()
    {
        closedZRotation = gameObject.transform.rotation.z;
    }

    public void Raise()
    {
        //Debug.Log("Raise the gate!");
        gameObject.transform.Rotate(new Vector3(0.0f, 0.0f, closedZRotation - 90.0f));
    }

    public void Lower()
    {
        //Debug.Log("Lower the gate!");
        gameObject.transform.Rotate(new Vector3(0.0f, 0.0f, closedZRotation + 90.0f));
    }
}
