()
| 3298 | } |
| 3299 | } |
| 3300 | setupKeys() { |
| 3301 | for (let i = 0; i < 4; i++) { |
| 3302 | for (let j = 0; j < 30; j++) { |
| 3303 | if (this.controls[i][j]) { |
| 3304 | this.controls[i][j].value = parseInt(this.keyLookup(this.controls[i][j].value)); |
| 3305 | if (this.controls[i][j].value === -1 && this.debug) { |
| 3306 | delete this.controls[i][j].value; |
| 3307 | console.warn("Invalid key for control " + j + " player " + i); |
| 3308 | } |
| 3309 | } |
| 3310 | } |
| 3311 | } |
| 3312 | } |
| 3313 | keyLookup(controllerkey) { |
| 3314 | if (controllerkey === undefined) return 0; |
| 3315 | if (typeof controllerkey === "number") return controllerkey; |
no test coverage detected