示例#1
0
        //===================================================================//
        //                           Variables                               //
        //===================================================================//
        // none anymore
        //===================================================================//
        //                         Constructors                              //
        //===================================================================//
        /// <summary>
        /// Creates some new <see cref="Hands"/> belonging to the specified
        /// <see cref="Person"/>.
        /// </summary>
        /// 
        /// <param name="owner">
        /// the <see cref="Person"/> to whom the <see cref="Hands"/> belong
        /// </param>
        public Hands(Person owner)
            : base(owner.GetSpecificName() + "'s hands",
			owner.GetSpecificName() + "'s hands.",
			parsedNames: new string[0],
			isProper: true, canBeTaken: false)
        {
            this.SetOwner(owner);
        }
示例#2
0
        //===================================================================//
        //                           Variables                               //
        //===================================================================//
        // none yet
        //===================================================================//
        //                         Constructors                              //
        //===================================================================//
        /// <summary>
        /// Creates a new <see cref="Clothes"/> object belonging to the specified <see cref="Person"/>.
        /// </summary>
        /// <param name="owner">the <see cref="Person"/> to whom the <see cref="Clothes"/> belong</param>
        public Clothes(Person owner)
            : base(owner.GetName() + "'s clothes",
			"The clothes that " + owner.GetName() + " is wearing.",
			parsedNames:new string[0],
			isProper: true, canBeTaken: false)
        {
            this.SetOwner(owner);
        }
示例#3
0
        /// <summary>
        /// Helper method that initializes the <see cref="player"/> character
        /// and the <see cref="Room"/>s of the game.
        /// </summary>
        private static void initPlayerAndRooms()
        {
            player = new Person("You", "How did you get this to display? It's supposed to be masked.", PronounSet.GetSecondPersonSet(), new string[] { "me" });
            firstRoom = new Room("Kitchen", "The kitchen is a room where people make food.");
            Room anotherRoom = new Room("Bedroom", "This is a place where people typically sleep. Its name comes from the piece of furniture, a bed, that usually occupies the room. However, while providing a place to rest is certainly one of a bedroom's important functions, it is also expected to provide several other services. As you may have already guessed, I needed a long description to test my description-displaying.");
            Room aThirdRoom = new Room("Hallway", "Just a heads up: this is the room I used for testing non-euclidean room connections. It worked.");

            Room.SetAdjacent(firstRoom, Direction.south, anotherRoom, Direction.north);
            Room.SetAdjacent(aThirdRoom, Direction.east, anotherRoom, Direction.west);
            aThirdRoom.SetAdjacent(firstRoom, Direction.southwest);

            Move(new Thing("table", "a kitchen table", canBeTaken:false), firstRoom);
            Move(new Thing(), firstRoom);
            Move(new Thing(), firstRoom);

            Move(new Thing("bed", "a thing that you sleep on", canBeTaken:false), anotherRoom);
            Move(new Person("Steve", "The first NPC I made for testing.", PronounSet.GetMaleSet()), anotherRoom);

            BasicContainer basket = new BasicContainer("basket", "A woven basket.");
            Move(basket, aThirdRoom);
            Move(new Thing("flower", "It's a dandylion."), basket);
            BasicOpenableContainer box = new BasicOpenableContainer("box", "I'm just going through classes I've made, instantiating them.", true);
            Move(box, aThirdRoom);
            Move(new Thing("plates", "Some nice dinner plates. This one was for testing plural nouns.", isPlural: true), box);
            Move(new Clothing("dress", "A cotton dress.", slots:new ClothingSlot[] { ClothingSlot.shirt, ClothingSlot.skirt}), aThirdRoom);

            Move(player, firstRoom);
        }
示例#4
0
 //===================================================================//
 //                         Constructors                              //
 //===================================================================//
 /// <summary>
 /// Creates a new <see cref="Clothes"/> object belonging to the specified <see cref="Person"/>.
 /// </summary>
 /// <param name="owner">the <see cref="Person"/> to whom the <see cref="Clothes"/> belong</param>
 public Clothes(Person owner)
     : base(owner.GetName() + "'s clothes", "The clothes that " + owner.GetName() + " is wearing.", isProper: true, canBeTaken: false)
 {
     this.owner = owner;
 }