diff --git a/Assets/Player.prefab b/Assets/Prefabs/Player.prefab similarity index 100% rename from Assets/Player.prefab rename to Assets/Prefabs/Player.prefab diff --git a/Assets/Player.prefab.meta b/Assets/Prefabs/Player.prefab.meta similarity index 100% rename from Assets/Player.prefab.meta rename to Assets/Prefabs/Player.prefab.meta diff --git a/Assets/Scripts/Door.cs b/Assets/Scripts/Door.cs index 2e7c241..5a5769a 100644 --- a/Assets/Scripts/Door.cs +++ b/Assets/Scripts/Door.cs @@ -4,19 +4,24 @@ using UnityEngine; public class Door : MonoBehaviour { private bool locked = false; + + BoxCollider2D boundingBox; // Use this for initialization void Start () { - locked = false; + boundingBox = GetComponent(); + Unlock(); } public void Lock() { locked = true; + boundingBox.enabled = true; } public void Unlock() { locked = false; + boundingBox.enabled = false; } public bool IsLocked()