1) create a bunch of bullets
2) make a list that contains all of the bullets
3) write code that checks all of the bullets in order to see if they have left the gun if the bullets hasn't left the gun, do the firing and returning sequence, if it has left the gun, it will move on to the next bullet in the sequence.
also as said here
Quote:
Originally Posted by pausch
So you'll have to basically move each bullet a little bit (maybe a 10th of a second), and then write some sort of looping or event-driven structure that "re-gooses" them to keep them moving.
On the plus side, this gives you a way to see if they are hitting anything, since you can do a simple collision detection every 1/10th of a second.
|
as stated her, you should break the firing sequence down into pieces so that you can check for a colision
i'm not entirely sure that this idea will work, but its worth a try