diff --git a/samples/bounce.scm b/samples/bounce.scm index a52e285..bfe85b4 100644 --- a/samples/bounce.scm +++ b/samples/bounce.scm @@ -97,19 +97,7 @@ (+ (rigidbody-2d-velocity rbody) (position transform)))))) -(define-record-type - (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)))))) +(register-action 'boost 'key-press KEY_SPACE) (add-system (make-system 'boost-rigidbody