Ensure boost acts on all balls
This commit is contained in:
parent
da164ae3c4
commit
04e3ec5fa6
1 changed files with 9 additions and 1 deletions
|
|
@ -107,11 +107,19 @@
|
|||
'entity
|
||||
'(<rigidbody-2d>)
|
||||
(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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue