예제 #1
0
 internal ShopWeapon(ShopWeapon weapon)
 {
     this.textWeaponName   = weapon.textWeaponName;
     this.weaponName       = weapon.weaponName;
     this.textDescription  = weapon.textDescription;
     this.textureReference = weapon.textureReference;
     this.price            = weapon.price;
     this.inventoryAmount  = weapon.inventoryAmount;
 }
예제 #2
0
 internal bool addItem(ShopWeapon shopWeapon)
 {
     if (isEmpty)
     {
         isEmpty        = false;
         weaponName     = shopWeapon.weaponName;
         shootsPerRound = shopWeapon.shootsPerRound;
         amountEquiped  = 1;
         maxAmmoLoaded  = shootsPerRound;
     }
     else
     {
         if (weaponName == shopWeapon.weaponName)
         {
             amountEquiped++;
             maxAmmoLoaded += shopWeapon.shootsPerRound;
         }
         else
         {
             return(false);
         }
     }
     return(true);
 }
예제 #3
0
 internal bool addItem(ShopWeapon shopWeapon)
 {
     if (isEmpty)
     {
         isEmpty       = false;
         weaponName    = shopWeapon.weaponName;
         amountEquiped = 1;
         Game1.config.shopWeapons[weaponName].inventoryAmount--;
         textureReference = shopWeapon.textureReference;
     }
     else
     {
         if (weaponName == shopWeapon.weaponName)
         {
             amountEquiped++;
             Game1.config.shopWeapons[weaponName].inventoryAmount--;
         }
         else
         {
             return(false);
         }
     }
     return(true);
 }