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