Simplifying engine interface #14
1 changed files with 1 additions and 13 deletions
|
|
@ -97,19 +97,7 @@
|
||||||
(+ (rigidbody-2d-velocity rbody)
|
(+ (rigidbody-2d-velocity rbody)
|
||||||
(position transform))))))
|
(position transform))))))
|
||||||
|
|
||||||
(define-record-type <key-press>
|
(register-action 'boost 'key-press KEY_SPACE)
|
||||||
(make-key-press key)
|
|
||||||
key-press?
|
|
||||||
(key key-press-key))
|
|
||||||
|
|
||||||
(add-system
|
|
||||||
(make-system 'input
|
|
||||||
0
|
|
||||||
'global
|
|
||||||
'()
|
|
||||||
(lambda ()
|
|
||||||
(when (key-pressed? KEY_SPACE)
|
|
||||||
(push-event 'input 'boost (make-key-press 'space))))))
|
|
||||||
|
|
||||||
(add-system
|
(add-system
|
||||||
(make-system 'boost-rigidbody
|
(make-system 'boost-rigidbody
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue