Okay so i have an array of bullet objects that i want to updae everytime the game loop runs. When the update method is called i want one bullet to fire when i click the mouse or press a key, however everytime i press the fire button on the keyboard or mouse all of the objects in the array seem to fire, i have managed to do this properly before but for the life of me i cannot figure out where i am going wrong, any suggestions?
Here is the code in the update method of my game:
for (int i = 0; i < maxbullets; i++)
{
bullets[i].update_bulets(gametime, Position, velocity,
rotation, viewport, keystate,
gamepadstate, bulletsound);
}