public void SetSecWeapon(string SecWeapon) { if (secondaryWeapon == SecWeapon) { return; } else { secondaryWeapon = SecWeapon; BulletInventory bullets = GetComponent <BulletInventory>(); if (secondaryWeapon == "228 Compact") { bullets.SetSecCurrBullets(13); bullets.SetSecMaxBullets(13); bullets.SetSecTotalBullets(13); bullets.SetSecMaxTotalBullets(52); } else if (secondaryWeapon == "Desert Eagle") { bullets.SetSecCurrBullets(7); bullets.SetSecMaxBullets(7); bullets.SetSecTotalBullets(14); bullets.SetSecMaxTotalBullets(35); } if (currWepType == "Secondary") { if (secondaryWeapon == "228 Compact") { weaponImage.sprite = CompactImage; } else if (secondaryWeapon == "Desert Eagle") { weaponImage.sprite = DesertImage; } } } }