What does your bullet creation code look like?
You'll want to do something like this:
| class Bullet |
| { |
| //add this |
| int TimeFired; |
| } |
| |
| //when creating a bullet: |
| bullets[i].TimeFired = System.Environment.TickCount; |
| |
| //when updating the bullets: |
| if(System.Environment.TickCount > bullets[i].TimeFired + 1000) |
| { |
| bullets[i].Alive = false; |
| } |
I can be more specific if I have more code to work with.
"Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"
In Playtest:
Avatar Land |
The MANLY Game for MANLY Men The signature that was too big for the 512 char limit