Skip to content

Commit

Permalink
Add quack sound.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed May 15, 2024
1 parent 1e32ffe commit 3b3a4f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/flappy-bird/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ def handle(event)
if @game.nil?
start_game!
elsif event.dig(:detail, :key) == " "
play_sound("quack") if rand > 0.5

@bird&.jump
end
end
Expand Down
2 changes: 1 addition & 1 deletion examples/flappy-bird/gems.locked
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ GEM
io-event (1.5.1)
io-stream (0.4.0)
json (2.7.2)
live (0.9.0)
live (0.11.0)
async-websocket (~> 0.23)
xrb
localhost (1.3.1)
Expand Down
Binary file added examples/flappy-bird/public/_static/quack.mp3
Binary file not shown.

0 comments on commit 3b3a4f8

Please sign in to comment.