You know how the console displays things like FPS, memory usage, no. of entities…
Is there any way of getting this information in my code?
You know how the console displays things like FPS, memory usage, no. of entities…
Is there any way of getting this information in my code?
I wouldn’t rely on the console to do it, as the console only updates this information when it is visible (and you presumably don’t want to be displaying the console in a release version of your game).
If somebody else hasn’t, I’ll be able to get back to you on this in a day or two (normally I’d be able to respond faster than that but I’m incredibly busy over the next couple of days!).
Have a little look at how the Console gets these metrics in net/flashpunk/debug/Console.as; https://github.com/Draknek/FlashPunk/blob/master/net/flashpunk/debug/Console.as