December 26, 2009Josh Brown
There are already a few solutions floating around on how to make setTimeout or setInterval call a method in your class. The typical solution involves a intermediate parameters and arbitrary functions. Here is mine:
setTimeout( function(o) { o.method() }, 1000, this );
It creates an intermediate function which accepts your instance from the parameters and calls your [...]
Read More »
Posted in JavaScript, Programming |
December 5, 2009Josh Brown
Surprise is a hard thing to fake for me. My wife buys me gifts and for some reason, I always guess what they are. I figure, as long as I don’t tell her that I guessed something, that I’m safe, but that isn’t the case. She either detects that I know or I don’t act [...]
Read More »
Posted in Uncategorized |
December 2, 2009Josh Brown
If you don’t already know, the easy solution is to use this.Graphics.ToggleFullScreen() in your Game object.
While part of the solution, this should not be your entire solution.
Requirements:
Resizable viewport
Viewport size restored when returning from full screen
Full screen resolution should match the current resolution of the monitor
Support multiple monitors of different resolutions
Only toggle [...]
Read More »
Posted in Uncategorized |