GameTime, and things that annoy me
by Jeff on Nov.08, 2008, under C#, Components, XNA
While working on my XNA framework I ran into the annoyance of having to create code simular to the following code over and over again.
float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds; |
This is rather annoying to have to add all over the place, wether it be in an update statement, physics calculations, render code, etc. So I ended up writing a simple component/service that can be added to any object in your game that will keep track of everything the GameTime object does and more.