Anybody here know C# well?
Basically I'm using OpenGL and the TAO framework to create a game and I'm trying to increment a score simply by one. I'm making space invaders and when the bullet hits the enemy the score needs to go up by one. Now I simply can't increment the variable by 1 as the display method updates however many times a second and so the score ends up getting incremented 30 odd times mores instead of once.
I've had a play about using booleans to create some kind of switch but this doesn't seem like the right thing to do. I have a feeling that using the system clock to only allow 1 to be incremented if a variable is used to measure a gap of 2 seconds between incrementing. This would stop it right?
Just can't get my head around doing it.. anybody got an example for me?
Thanks!