// Start is called before the first frame update
    void Start()
    {
        AM = GameObject.Find("AudioManager").GetComponent <AudioMaster>();

        ruleBook = GetComponent <RuleBook>();
        GM       = GetComponent <GameManager>();
        TE       = FindObjectOfType <TrapEvent>();

        //foreach(GameObject sign in signs)
        //{
        //   DontDestroyOnLoad(sign);
        //}

        truthfulSigns = new List <bool> {
        };
        allRooms      = new List <RoomStats> {
        };

        // Make a new room with some stats. This will have to read back info from the manager object with room generation
        ruleBook.AddNewRule();
        CreateNewRoom();
        newRuleHint.gameObject.SetActive(true);
        if (allRooms.Count == 0)
        {
            hintText.text = "Press 'A' or 'D' to check out your environment. \n[A][D]";
        }
    }
    // Called when you enter a door
    public void EnterDoor(int doorNum)
    {
        if (currentRoom.safeDoors[doorNum] == true)
        {
            print("YOU PICKED A SAFE DOOR");
            GM.UpgradeKey();
            allRooms.Add(currentRoom);
            if (allRooms.Count % 5 == 0)
            {
                ruleBook.AddNewRule();
                // show hint
                newRuleHint.gameObject.SetActive(true);
                if (allRooms.Count == 0)
                {
                    hintText.text = "Check your rulebook. New rules appear every 5 tunnels. \n[W]";
                }
                else
                {
                    hintText.text = "The cave has gotten more complex.";
                }
            }
            else
            {
                // hide hint
                newRuleHint.gameObject.SetActive(false);
            }
            GM.AddToTimer();
            GM.DestroyProps();
            CreateNewRoom();
        }
        else
        {
            print("YOU ARE DEAD, WRONG DOOR");
            // Kill everything
            AM.youLose();
            GM.isTiming = false;

            SceneManager.LoadScene("Death");
        }
    }