I have been following the tutorial on Microsofts website and they use GameTime to keep track of a few things. However when I create a new instance, it does not start counting and there is no function like .start() to start the timer. When I run the game the created object gameTime from GameTime remains at 0 for every element inside. Does anyone know how to use GameTime properly because obviously, I am doing it wrong 😉
-Thanks
You should not be creating an instance of the
GameTimeclass and instead be using thegameTimeparameter provided to theDraw()andUpdate()methods of theGameclass:A good reference for Windows Phone 7 is Programming Windows Phone 7, a free e-book by Charles Petzold.