Timer
Author |
Message |
Smarteez
|
Posted: Thu Nov 30, 2006 10:13 am Post subject: Timer |
|
|
How do I enter a timer into my game so there is a limited time to get to the end of the level? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu Nov 30, 2006 10:19 am Post subject: (No subject) |
|
|
You need a way to measure the current time - as in time passed since some set point. I think Time.Elapsed will tell the time since your program began running.
Record the time at the beginning of the level, and once again when you want to check for time-out. The difference is your time passed. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
|
|