Name: Anonymous 2010-06-16 8:15
[/code]
/--------------------------------------------------------------
/--------------------------DISCLAIMER--------------------------
/This code is in C# using the XNA Framework, if you have no /clue what im talking about, please take your SICP to other /threads, theres a reason im using a greasemonkey scripts to /block the word SICP
/--------------------------------------------------------------
[/code]
So in my pong remake, i want to make a timer to show when to reset the ball after the player scores.
Using GameTime, how would i go about making a timer readable by other code
for example:
Here is when the ball will be reset
This is saying whenever the "resetTimer" reaches 0 seconds, the ball will begin to move again.
I understand that ElapsedGameTime means the amount of time between frames, but is there any way for my "resetTimer" to be subtracted by one every second? (in this case, "resetTimer" is declared an int with the value of 3)
/--------------------------------------------------------------
/--------------------------DISCLAIMER--------------------------
/This code is in C# using the XNA Framework, if you have no /clue what im talking about, please take your SICP to other /threads, theres a reason im using a greasemonkey scripts to /block the word SICP
/--------------------------------------------------------------
[/code]
So in my pong remake, i want to make a timer to show when to reset the ball after the player scores.
Using GameTime, how would i go about making a timer readable by other code
for example:
Here is when the ball will be reset
while (resetTimer <= 0)
{
ballVelocity = new Vector2(10, 10);
}This is saying whenever the "resetTimer" reaches 0 seconds, the ball will begin to move again.
I understand that ElapsedGameTime means the amount of time between frames, but is there any way for my "resetTimer" to be subtracted by one every second? (in this case, "resetTimer" is declared an int with the value of 3)