コード例 #1
0
        //TODO: Make this load from a file, or create a version that does.
        /// <summary>
        /// A very basic hard coded weapon load out
        /// </summary>
        /// <returns>an array of weapons</returns>
        private static Weapon[] SetupWeapons()
        {
            Weapon[] tmpArr = new Weapon[5];
            tmpArr[0] = new Melee();

            tmpArr[1] = new Melee("Excalibur the confused sword", "Two Handed Sword", 5, 2);
            tmpArr[2] = new Melee("Short sword", "One Handed Sword", 2);
            tmpArr[3] = new Ranged();

            tmpArr[4] = new Ranged(
                _name: "Super Bow",
                _type: "Enchanted Bow",
                _age: 20,
                _numberOfHands: 2
                );
            return(tmpArr);
        }