Skip to content

Commit

Permalink
Final music.
Browse files Browse the repository at this point in the history
  • Loading branch information
boone committed Feb 27, 2022
1 parent 7a78f74 commit 70b2b0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rogue_rooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ def initialize
@target = Gosu::Image.new("images/target.png", tileable: true)
@info_bar = Gosu::Image.new("images/title.png", tileable: true)

@song = Gosu::Song.new("sounds/song_test.wav")
@song = Gosu::Song.new("sounds/song.wav")
@crash_sound = Gosu::Sample.new("sounds/crash.wav")

@score_font = Gosu::Font.new(30, bold: true)
@about_font = Gosu::Font.new(20)
@license_font = Gosu::Font.new(15)

@song.volume = 0.15
@song.volume = 0.25
@song.play(true)

@show_about = true
Expand Down Expand Up @@ -108,17 +108,19 @@ def update
update_time = Time.now # so we don't keep calculating

if @show_about
@song.volume = 0.05
@song.volume = 0.25
return
elsif @game_over
@song.volume = 0.05
@song.volume = 0.25
@game_over_time ||= update_time

if @game_over_time + GAME_OVER_WAIT < update_time
@game_over_wait_done = true
end

return
else
@song.volume = 0.5
end

# place target
Expand Down
Binary file added sounds/song.wav
Binary file not shown.

0 comments on commit 70b2b0f

Please sign in to comment.