Exemplo n.º 1
0
 public void nextWeapon(bool pressed)
 {
     if(lastNextPress != pressed && !allWeaponsEmpty()){
         if(pressed){
             do{
                 if(equippedWeaponNumber+1>(int)WeaponType.NUMBER_OF_WEAPONS-1){
                     equippedWeaponNumber = 0;
                 } else {
                     equippedWeaponNumber++;
                 }
                 equippedWeapon = allWeapons[(int)equippedWeaponNumber];
             } while(equippedWeapon.remainingAmmo() == 0);
         }
     }
     lastNextPress = pressed;
 }