Sha256: ae0506fdcb45d2f5488ff1f6357424b8fc27ab542d7c48fc9cbfbd6d1638ecb2
Contents?: true
Size: 320 Bytes
Versions: 2
Compression:
Stored size: 320 Bytes
Contents
# sound.rb module Ruby2D class Sound def initialize(window, path) unless File.exists? path raise Error, "Cannot find sound file!" end window.create_audio(self, path) @window, @path = window, path end def play @window.play_audio(self) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ruby2d-0.2.1 | lib/ruby2d/sound.rb |
ruby2d-0.2.0 | lib/ruby2d/sound.rb |