lib/gamebox/core/sound_manager.rb
# plays the sound based on the name with the specified volume level.
# play_sound :foo # play sound at 100% volume
plays the sound based on the name with the specified volume level.
play_sound :foo # play sound at 100% volume
plays the sound based on the name with the specified volume level . play_sound : foo # play sound at 100% volume
def play_sound(what, opts={})
    if @enabled && @sounds[what]
      merged_opts = {volume:1, speed:1, looping:false}.merge opts
      @playing_sounds[what] = @sounds[what].play merged_opts[:volume], merged_opts[:speed], merged_opts[:looping]
    end
  end
def play_sound ( what , opts = { } ) if @enabled && @sounds [ what ] merged_opts = { volume : 1 , speed : 1 , looping : false } . merge opts @playing_sounds [ what ] = @sounds [ what ] . play merged_opts [ :volume ] , merged_opts [ :speed ] , merged_opts [ :looping ] end end
plays the sound based on the name with the specified volume level.
plays the sound based on the name with the specified volume level .
what
<not_specific>
opts
<not_specific>