Open alexashx opened 11 years ago
I implemented this function by setInterval and clearInterval and I wonder if there is an built-in solution @bfirsh
if (value==0x41) {
if (this.interval[i].X) {
clearInterval(this.interval[i].X);
}
this.interval[i].X = setInterval( () => {
this.state[i][this.keys.A] = 0x81 - this.state[i][this.keys.A];
}, 50);
}
else if (value==0x40) {
clearInterval(this.interval[i].X);
this.state[i][this.keys.A] = 0x40;
}
@bfirsh I have the same problem. @MeteorKL Does this way work?
@stoneWeb yeh, it works.
On standard joystick has two buttons A and two buttons B. A lot of games controlled by including two keys AA and BB, access to which is not in the current edition.