From 190a32ac545b5a8f62f9a3c5dd963c3c1432d492 Mon Sep 17 00:00:00 2001 From: BirDt_ Date: Fri, 17 Apr 2026 19:27:23 +0800 Subject: [PATCH] Easier way to register inputs --- samples/bounce.scm | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) 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