Ejemplo n.º 1
0
 public Weapon(
     string name,
     WeaponArchType weaponType,
     int damageStat,
     DamageType damageType)
 {
     Name       = name;
     WeaponType = weaponType;
     Damage     = damageStat;
     DamageType = damageType;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// This method is used to provide an abstracted way to deliver the image strings for
        /// the weapon icons, so they can be easily bound in the ConsoleViewModel.
        /// </summary>
        /// <param name="selectedWeapon"></param>
        /// <returns>selectedWeapon</returns>
        private string GetIcon(WeaponArchType weaponType)
        {
            switch (weaponType)
            {
            case WeaponArchType.Pistol:
                return("/images/pistol.ico");

            case WeaponArchType.Shotgun:
                return("/images/shotgun.ico");

            case WeaponArchType.Carbine:
                return("/images/carbine.ico");

            case WeaponArchType.Rifle:
                return("/images/rifle.ico");

            case WeaponArchType.Sniper:
                return("/images/sniper.ico");

            default:
                return("/images/refresh.ico");
            }
        }
Ejemplo n.º 3
0
 public Weapon Generate(WeaponArchType weaponArchType) =>
 new Weapon(
     _generateWeaponName.Generate(),
     weaponArchType,
     _generateDamageStat.Generate(),
     _generateDamageType.Generate());