Quote:
Originally Posted by PrinceOfKenshin
I'm kinda new to gs2, why would you use a temp variable for that?
|
Because there's no point in taking up memory when this doesn't need to be stored past this function.
If you knew GS1, it's basically equivelant to a variable with no prefix, which is lost after the function is over.
temp.k just told me true/false the key is pressed. I could have eliminated this and made it into an if statement; this was just easier and simpler.
this.isKeyPressed tells me if LAST time around it was pressed, so I can tell if it is being held down, or touched once. This is so you can have modes such as single, automatic, etc.