We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed83d4c commit 6f02770Copy full SHA for 6f02770
game.js
@@ -94,7 +94,19 @@ function intit() {
94
fighter.x -= 30
95
}
96
97
+
98
+ function mouseclick(e) {
99
+ // console.log(e)
100
+ if (e.screenX > fighter.x) {
101
+ fighter.x += 30
102
+ }
103
+ if (e.screenX < fighter.x) {
104
+ fighter.x -= 30
105
106
107
108
document.addEventListener("keydown", keypressed)
109
+ document.addEventListener("click", mouseclick)
110
111
112
0 commit comments