public void AddRoom(Room4 room) { if (!RoomList.Contains(room)) { RoomList.Add(room); } }
private static Area[] GetAreas() { var area1 = Room1.GetRoom(); var area2 = Room2.GetRoom(); var area3 = Room3.GetRoom(); var area4 = Room4.GetRoom(); return(new Area[4] { area1, area2, area3, area4 }); }
/// <summary> /// Start method of GetPlayOrder /// </summary> void Start() { playCounter = 0; PianoPlayerInput = new CustomVector3(0, 0, 0); room4 = FindObjectOfType <Room4>(); inventory = FindObjectOfType <Inventory>(); itemComparer = FindObjectOfType <ItemComparer>(); if (inventory.Bag.Contains(itemComparer.PianoKey1) && inventory.Bag.Contains(itemComparer.PianoKey2) && inventory.Bag.Contains(itemComparer.PianoKey3)) { roomDoor.enabled = true; } }
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); } }
public void TestLinking() { { Room4 room = new Room4(); Assert.IsFalse(room.HasNorthRoom); Assert.IsFalse(room.HasNorthRoom); Assert.IsFalse(room.HasNorthRoom); Assert.IsFalse(room.HasNorthRoom); Assert.AreEqual(Door4.None, room.Doors); Assert.AreEqual(Wall4.All, room.Walls); } { Room4 room = new Room4(); room.NorthRoom = new Room4(); Assert.IsTrue(room.HasNorthRoom); Assert.IsFalse(room.HasSouthRoom); Assert.IsFalse(room.HasEastRoom); Assert.IsFalse(room.HasWestRoom); Assert.AreEqual(Door4.North, room.Doors); Assert.AreEqual(Wall4.South | Wall4.East | Wall4.West, room.Walls); } { Room4 room = new Room4(); room.SouthRoom = new Room4(); Assert.IsFalse(room.HasNorthRoom); Assert.IsTrue(room.HasSouthRoom); Assert.IsFalse(room.HasEastRoom); Assert.IsFalse(room.HasWestRoom); Assert.AreEqual(Door4.South, room.Doors); Assert.AreEqual(Wall4.North | Wall4.East | Wall4.West, room.Walls); } { Room4 room = new Room4(); room.WestRoom = new Room4(); Assert.IsFalse(room.HasNorthRoom); Assert.IsFalse(room.HasSouthRoom); Assert.IsFalse(room.HasEastRoom); Assert.IsTrue(room.HasWestRoom); Assert.AreEqual(Door4.West, room.Doors); Assert.AreEqual(Wall4.South | Wall4.East | Wall4.North, room.Walls); } { Room4 room = new Room4(); room.EastRoom = new Room4(); Assert.IsFalse(room.HasNorthRoom); Assert.IsFalse(room.HasSouthRoom); Assert.IsTrue(room.HasEastRoom); Assert.IsFalse(room.HasWestRoom); Assert.AreEqual(Door4.East, room.Doors); Assert.AreEqual(Wall4.South | Wall4.North | Wall4.West, room.Walls); } }
public void AddRoom(Room4 room) { if (!RoomList.Contains(room)) { RoomList.Add(room); } }