示例#1
0
        /// <summary>
        /// Alternative constructor to initialise weapon properties.
        /// </summary>
        /// <param name="typeweapon">Weapon type we want the weapon to be.</param>
        public Weapon(TypesOfWeapon typeweapon)
        {
            // Set weapon type
            WeaponType = typeweapon;

            // Set weapon durability and attack power
            SetDurAndAP();
        }
示例#2
0
        /// <summary>
        /// Constructor to initialise weapon properties.
        /// </summary>
        public Weapon()
        {
            // Initialise weapon type randomly from all types of enum
            WeaponType = (TypesOfWeapon)
                         rnd.Next(Enum.GetNames(typeof(TypesOfWeapon)).Length);

            // Set weapon durability and attack power
            SetDurAndAP();
        }