//Check if player spawned in initial room, if not, turn it off protected override void CheckForRoom() { if (_rooms.TriggerTarget != null) { Vector3 player = _rooms.TriggerTarget.position; roomPlayerIsIn = _rooms.ComputeCurrentRoom(player); if (roomPlayerIsIn != 26) { Room26.SetActive(false); } } }
public override void TurnRoomsOff() { //Deactivates all rooms except the point of entry and save rooms. if (Room0 != null) { //Room0.SetActive(false); } if (Room1 != null) { //Room1.SetActive(false); } if (Room2 != null) { Room2.SetActive(false); } if (Room3 != null) { Room3.SetActive(false); } if (Room4 != null) { Room4.SetActive(false); } if (Room5 != null) { //Room5.SetActive(false); } if (Room6 != null) { Room6.SetActive(false); } if (Room7 != null) { Room7.SetActive(false); } if (Room8 != null) { Room8.SetActive(false); } if (Room9 != null) { Room9.SetActive(false); } if (Room10 != null) { Room10.SetActive(false); } if (Room11 != null) { Room11.SetActive(false); } if (Room12 != null) { Room12.SetActive(false); } if (Room13 != null) { Room13.SetActive(false); } if (Room14 != null) { Room14.SetActive(false); } if (Room15 != null) { Room15.SetActive(false); } if (Room16 != null) { Room16.SetActive(false); } if (Room17 != null) { Room17.SetActive(false); } if (Room18 != null) { Room18.SetActive(false); } if (Room19 != null) { Room19.SetActive(false); } if (Room20 != null) { //Room20.SetActive(false); } if (Room21 != null) { Room21.SetActive(false); } if (Room22 != null) { Room22.SetActive(false); } if (Room23 != null) { Room23.SetActive(false); } if (Room24 != null) { Room24.SetActive(false); } if (Room25 != null) { Room25.SetActive(false); } if (Room26 != null) { Room26.SetActive(false); } if (Room27 != null) { //Room27.SetActive(false); } if (Room28 != null) { Room28.SetActive(false); } if (Room29 != null) { Room29.SetActive(false); } if (Room30 != null) { //Room30.SetActive(false); } if (Room31 != null) { Room31.SetActive(false); } if (Room32 != null) { //Room32.SetActive(false); } if (Room34 != null) { Room34.SetActive(false); } }