touchscreen input no longer buffers

This commit is contained in:
Nathan DECHER
2020-03-26 12:04:18 +01:00
parent 86cd935f03
commit 352c3aa16d
2 changed files with 14 additions and 4 deletions
+6
View File
@@ -322,6 +322,12 @@ class SnekGame {
else if(inputs.right && trySet([ 1, 0])) return delete inputs.right;
else if(inputs.up && trySet([ 0,-1])) return delete inputs.up;
else if(inputs.down && trySet([ 0, 1])) return delete inputs.down;
if(inputs.clearBuffer) {
Object
.keys(inputs)
.forEach(k => delete inputs[k]);
}
}
start() {