using System.Collections; using System.Collections.Generic; using UnityEngine; public class DoorDebugging : MonoBehaviour { Animator doorAnimator; public bool DoorRequiresKey; public bool DoorIsOpen; public float RotationSpeed; [HideInInspector] public bool CanOpenDoor = true; //void Start() //{ // doorAnimator = GetComponentInChildren(); // if (DoorRequiresKey) // { // CanOpenDoor = false; // } //} //private void OnTriggerStay(Collider col) //{ // if (col.gameObject.tag == "Player") // { // if (Input.GetKeyDown(KeyCode.Mouse0)) // { // if (CanOpenDoor) // { // if (!DoorIsOpen) // { // DoorOpen(); // } // else // { // DoorClose(); // } // } // else if (DoorRequiresKey) // { // Debug.Log("Door is locked"); // } // else // { // Debug.Log("Door is jammed"); // } // } // } //} //public void DoorOpen() //{ // doorAnimator.Play("DoorOpen"); // DoorIsOpen = true; //} //public void DoorClose() //{ // doorAnimator.Play("DoorClose"); // DoorIsOpen = false; //} //public void LockDoor() //{ // DoorRequiresKey = true; // CanOpenDoor = false; //} //public void UnlockDoor() //{ // DoorRequiresKey = false; // CanOpenDoor = true; //} }