예제 #1
0
 void set_type(Uint32 type){
     switch (type){
         case man_Pistol: cooldown = 10; damage = 10; ammo.resize(100); break;
         case semi_Pistol: cooldown = 5; damage = 8; ammo.resize(30); break;
         case man_Rifle: cooldown = 15; damage = 20; ammo.resize(8); break;
         case semi_Rifle: cooldown = 8; damage = 18; ammo.resize(30); break;
         case auto_Rifle: cooldown = 2; damage = 15; ammo.resize(50); break;
         default: break;
     }
     version = type;
 }
예제 #2
0
 weapon(){
     ammo.resize(1);
     cooldown = 5;
     damage = 10;
 }