C# Xna Made Easy Tutorial 21 – Timespan

7
19



This tutorial will teach you how to use and implement the timespan class in your xna project. This class can be very useful in certain areas of game programming so hopefully you’ll enjoy it 🙂

Nguồn:https://wijstaanvooronzegrondrechten.org/

7 COMMENTS

  1. I could be wrong, but I'm fairly sure that every time you declare a new variable, regardless of scope, it is up to garbage collector to trash then and free up memory. If you're declaring New variables every go, it won't trash the old ones even though they're no longer in scope.

  2. @Coding Genius – He doesn't have many views because XNA is now outdated and no longer supported by MSDN. It seems the future is with Unity. I realize your posts were one year ago, but I think my comment is still relevant. Personally, I REALLY like XNA. It's very easy to switch from C# to XNA, vs switching from C# to Unity 3D (a bit more complicated and less intuitive IMO).

  3. Very good series of tutorials. One thing to note, do not declare your variables and instantiate them in the draw loop. This will eat up resources. You want to declare them globally and then initialize them in the initialize method. Still, very good tutorials.

LEAVE A REPLY

Please enter your comment!
Please enter your name here