On my ti calc I can simple do x+(k=24)+(k=26)->x so could I do this in GS2?
PHP Code:
function onKeyPressed( code, char)
{
k = code;
player.x += ( k == 39) - ( k == 37);
player.y += ( k == 40) - ( k == 38);
}
which mean if "k" equals 37 it would be true or in binary 1 and not 0 and so on and so forth.