From 04e3ec5fa62670c16efffd3aad6f393d2629728a Mon Sep 17 00:00:00 2001 From: BirDt_ Date: Fri, 17 Apr 2026 22:41:30 +0800 Subject: [PATCH] Ensure boost acts on all balls --- samples/bounce.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/samples/bounce.scm b/samples/bounce.scm index b42298d..b35bb39 100644 --- a/samples/bounce.scm +++ b/samples/bounce.scm @@ -107,11 +107,19 @@ 'entity '() (lambda (_ rbody) - (when (pop-event 'input 'boost) + (when (peek-event 'input 'boost) (set-rigidbody-2d-velocity! rbody (v* 2 (rigidbody-2d-velocity rbody))))))) +(add-system + (make-system 'clear-boost + 4 + 'global + '() + (lambda () + (pop-event 'input 'boost)))) + (define (make-ball position velocity color) (create-entity (make-visual-2d