void Debugger() { if (!FindObjectOfType <Interactions>()) { Debug.Log("Interactions class not found in scene. Proceeding without interactions.."); } if (FindObjectsOfType <DoorTrigger>()[0] == null) { Debug.Log("No doortrigger found in scene. Proceeding without door opening functionality.."); } for (int i = 0; i < BriansEngine.openable.Count; i++) { if (BriansEngine.openable[i].doorState == true) { BriansEngine.Doors door = BriansEngine.openable[i].doorType; GameObject key = BriansEngine.openable[i].doorKey; if (key == null) { Debug.Log("<color=yellow>Closed door found but there's no key assigned to open it! Door: " + door.ToString() + "Door will be closed in game..</color>"); } else { Keys[] sceneKeys = FindObjectsOfType <Keys>(); if (sceneKeys != null) { foreach (Keys k in sceneKeys) { if (k.gameObject.Equals(BriansEngine.openable[i].doorKey)) { Debug.Log("<color=green>Closed door: " + door.ToString() + " Marked door to open: " + key.ToString() + " Assigned key object in scene: " + k.name + "</color>"); } } } } } } }
public DoorStateChecker(BriansEngine.Doors newDoor, bool newState, GameObject newKey) { doorType = newDoor; doorState = newState; doorKey = newKey; }