public void SetObjects() { if (!_lvlGeneratorReference.colectableRoomPositions.Contains(roomPos)) { if (colectableToSpawn != null) { colectableToSpawn.SetActive(false); } if (lightReference != null) { lightReference.SetActive(true); } } if (_lvlGeneratorReference.colectableRoomPositions.Contains(roomPos)) { temp = true; if (lightReference != null) { lightReference.SetActive(false); } if (colectableToSpawn != null) { colectableToSpawn.SetActive(true); } } if (!_lvlGeneratorReference.teleportRoomPositions.Contains(roomPos)) { noteleport = true; if (teleportReference != null) { teleportReference.SetActive(false); } } else { _teleportReference.AddRoom(this); } }