[feat] move left
This commit is contained in:
parent
f06e510505
commit
8412883500
1 changed files with 2 additions and 1 deletions
3
game.scm
3
game.scm
|
@ -122,11 +122,12 @@
|
|||
(cond
|
||||
((string=? key key:left)
|
||||
(dprint "key:" key)
|
||||
(collide-gelement! (- (car (parentheses-pos (level-left-parenthes *level*))) 1) (cdr (parentheses-pos (level-left-parenthes *level*))) (level-left-parenthes *level*))
|
||||
(set! *element-x* (- *element-x* 10)))
|
||||
((string=? key key:right)
|
||||
(dprint "key:" key)
|
||||
(set! *element-x* (+ *element-x* 10))
|
||||
(collide-gelement! (+ 1 (car (parentheses-pos (level-left-parenthes *level*)))) (cdr (parentheses-pos (level-left-parenthes *level*))) (level-left-parenthes *level*))
|
||||
(collide-gelement! (+ (car (parentheses-pos (level-left-parenthes *level*))) 1) (cdr (parentheses-pos (level-left-parenthes *level*))) (level-left-parenthes *level*))
|
||||
))))
|
||||
|
||||
(add-event-listener! (current-document) "keydown"
|
||||
|
|
Loading…
Reference in a new issue