Sha256: 007cab481cb58b01b140f512232b8e7e53c6c45f355a8c63f65555d7c336a0b0

Contents?: true

Size: 432 Bytes

Versions: 5

Compression:

Stored size: 432 Bytes

Contents


Behavior.define :audible do
  
  requires :sound_manager
  setup do
    reacts_with :play_sound, :stop_sound
  end

  helpers do
    # Plays a sound via the SoundManager.  See SoundManager for
    # details on how to "define" sounds.
    def play_sound(*args)
      sound_manager.play_sound *args
    end

    # Stops a sound via the SoundManager.
    def stop_sound(*args)
      sound_manager.stop_sound *args
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gamebox-0.4.0.rc5 lib/gamebox/behaviors/audible.rb
gamebox-0.4.0.rc4 lib/gamebox/behaviors/audible.rb
gamebox-0.4.0.rc3 lib/gamebox/behaviors/audible.rb
gamebox-0.4.0.rc2 lib/gamebox/behaviors/audible.rb
gamebox-0.4.0.rc1 lib/gamebox/behaviors/audible.rb