コード例 #1
0
ファイル: Passage.cs プロジェクト: Voidable/QuestGame-TB
 /// <summary>
 /// Create the Passage, must be passed an entrance room and an exit room.
 /// </summary>
 public Passage(Room entrance, Room exit)
 {
     _entrance = entrance;
     _exit = exit;
     _isLocked = false;
     _unlockable = false;
     _unlockItem = Item.ItemTypes.GENERIC;
     _lockedResponse = "It's locked. They thought of everything.";
     _moveThrough = "Whoosh!";
 }
コード例 #2
0
ファイル: Building.cs プロジェクト: Voidable/QuestGame-TB
        /// <summary>
        /// Creates all Rooms in the building.
        /// </summary>
        public void InitializeRooms()
        {
            #region Outside of Building
            Room nOutside = new Room();
            nOutside.Name = "North of the Building";
            nOutside.Description = "The northern side of the building has a public entrance. It looks really tall from this angle. There is an alley to the east. To the west is a road.";
            _rooms.Add(nOutside);   //  Index 0

            Room eOutside = new Room();
            eOutside.Name = "East of the Building";
            eOutside.Description = "The eastern side of the building is an alley-way. There are some dumpsters with an unpleasant smell about them. The alley has exits to the north and south.";
            _rooms.Add(eOutside);   //  Index 1

            Room sOutside = new Room();
            sOutside.Name = "South of the Building";
            sOutside.Description = "The southern side of the building is the employee entrance. There is a security door with a key-card scanner. To the west is a road. There is an alley to the east.";
            _rooms.Add(sOutside);   //  Index 2

            Room wOutside = new Room();
            wOutside.Name = "West of the Building";
            wOutside.Description = "The western side of the building is next to a very busy street. Don't play in traffic. The road runs north-south.";
            _rooms.Add(wOutside);   //  Index 3
            #endregion
            #region Ground Floor
            Room nL1 = new Room();
            nL1.Name = "Northern end of Lobby";
            nL1.Description = "The public entrance to the building. There is a reception desk with a drinking bird toy on it. The exit of the lobby is north. The lobby extends to the south.";
            _rooms.Add(nL1);   //  Index 4

            Room cL1 = new Room();
            cL1.Name = "Southern end of Lobby";
            cL1.Description = "Further inside the lobby, there are some chairs and plants. The lobby extends to the north. There is elevators to the west, but they are out of order. To the south is an employee's only door.";
            _rooms.Add(cL1);   //  Index 5

            Room sL1 = new Room();
            sL1.Name = "Employee break room";
            sL1.Description = "A nice break room with plenty of seats and a vending machine. The door to the south leads out of the building. The door to the north goes to the lobby. There are stairs to the west.";
            _rooms.Add(sL1);   //  Index 6
            #endregion
        }