Ejemplo n.º 1
0
 public void notifyPassage(Room toRoom)
 {
     for (int i = 0; i < fNumPassages; ++i)
     {
         if (fPassages[i] == toRoom)
         {
             Utility.Assert(fPortcullis[i] != kPortcullisClosed, "Room.notifyPassage - someone passed through closed portcullis");
             if (fPortcullis[i] == kPortcullisOpen)
             {
                 if (GameEngine.rand.range(1, 5) == 1)
                 {
                     fPortcullis[i] = kPortcullisClosed;
                     toRoom.closePortcullis(this);
                 }
             }
             break;
         }
     }
 }