Add sound effects for switched emitters.
This commit is contained in:
parent
ade893c45a
commit
65076c40f3
4 changed files with 11 additions and 2 deletions
BIN
assets/sounds/emitter-off.wav
Normal file
BIN
assets/sounds/emitter-off.wav
Normal file
Binary file not shown.
BIN
assets/sounds/emitter-on.wav
Normal file
BIN
assets/sounds/emitter-on.wav
Normal file
Binary file not shown.
6
game.scm
6
game.scm
|
@ -70,6 +70,8 @@
|
|||
(define audio:exit (load-sound-effect "exit"))
|
||||
(define audio:pickup (load-sound-effect "pickup"))
|
||||
(define audio:emit (load-sound-effect "emit"))
|
||||
(define audio:emitter-on (load-sound-effect "emitter-on"))
|
||||
(define audio:emitter-off (load-sound-effect "emitter-off"))
|
||||
(define audio:die (load-sound-effect "die"))
|
||||
(define audio:gate (load-sound-effect "gate"))
|
||||
(define audio:warp (load-sound-effect "warp"))
|
||||
|
@ -258,6 +260,10 @@
|
|||
(set! *gems* (cons *level-idx* *gems*)))
|
||||
(('emit x y)
|
||||
(play-sound-effect audio:emit))
|
||||
(('emitter-on x y)
|
||||
(play-sound-effect audio:emitter-on))
|
||||
(('emitter-off x y)
|
||||
(play-sound-effect audio:emitter-off))
|
||||
(('gate-open x y)
|
||||
(play-sound-effect audio:gate))
|
||||
(('gate-close x y)
|
||||
|
|
|
@ -161,8 +161,11 @@
|
|||
(('exit obj grid-info) #f)
|
||||
(('activate grid-info)
|
||||
($ on? #t)
|
||||
($ timer 0))
|
||||
(('deactivate grid-info) ($ on? #f))
|
||||
($ timer 0)
|
||||
($ grid-info 'append-event `(emitter-on ,x ,y)))
|
||||
(('deactivate grid-info)
|
||||
($ on? #f)
|
||||
($ grid-info 'append-event `(emitter-off ,x ,y)))
|
||||
(('wire-state grid-info)
|
||||
(when ($ on?)
|
||||
(let ((t ($ timer)))
|
||||
|
|
Loading…
Add table
Reference in a new issue