case WEAPONTYPE.SINGLESHOT:
int leftBullet = clipMaxSingleShootBullet - clip[weaponType];//所需要的子弹
if (leftBullet > bag[weaponType])//需要的子弹大于背包子弹,就是背包子弹不够了
{
clip[weaponType] += leftBullet;
bag[weaponType] = 0;
}
else//背包可以满足所需子弹
{
bag[weaponType] -= leftBullet;
clip[weaponType] += leftBullet;
}
break;