18.06.2015, 15:28
If you have boolean variable like
instead of doing this
you can instead do this
or
Code:
new isEventRunning;
Code:
if(isEventRunning) { isEventRunning = false; // do stuff } else { isEventRunning = true; // do stuff }
Code:
if((isEventRunning = !isEventRunning)) { // event is running } else { // event isn't running }
Code:
if((isEventRunning ^= 1)) { // event is running } else { / event is not running }