public void resetAll() { for (int i = 0; i < rooms.Count; i++) { rooms[i].gameObject.GetComponent<Room>().exited(); } }