case
This commit is contained in:
parent
9cba0ca9b9
commit
5a5b3cc8db
41
src/App.vue
41
src/App.vue
@ -118,30 +118,23 @@ export default {
|
||||
|
||||
created() {
|
||||
window.addEventListener('keyup', (e) => {
|
||||
if (e.key == 'q') {
|
||||
this.playOSC(this.spaces[0].tone)
|
||||
this.checkInput(0)
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('keyup', (e) => {
|
||||
if (e.key == 'w') {
|
||||
this.playOSC(this.spaces[1].tone)
|
||||
this.checkInput(1)
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('keyup', (e) => {
|
||||
if (e.key == 'a') {
|
||||
this.playOSC(this.spaces[2].tone)
|
||||
this.checkInput(2)
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('keyup', (e) => {
|
||||
if (e.key == 's') {
|
||||
this.playOSC(this.spaces[3].tone)
|
||||
this.checkInput(3)
|
||||
switch(e.key) {
|
||||
case "q":
|
||||
this.playOSC(this.spaces[0].tone)
|
||||
this.checkInput(0)
|
||||
break
|
||||
case "w":
|
||||
this.playOSC(this.spaces[1].tone)
|
||||
this.checkInput(1)
|
||||
break
|
||||
case "a":
|
||||
this.playOSC(this.spaces[2].tone)
|
||||
this.checkInput(2)
|
||||
break
|
||||
case "s":
|
||||
this.playOSC(this.spaces[3].tone)
|
||||
this.checkInput(3)
|
||||
break
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user