cube-tube/app/util/sound.rb
Gordon Pedersen 2065a6b4d6 Removed some logging and commented out code
Also added a couple of comments related to the scene logic
2023-03-27 14:13:39 +11:00

26 lines
No EOL
490 B
Ruby

# frozen_string_literal: true
# Module for managing and interacting with sounds.
module Sound
class << self
def for(key)
SOUNDS.fetch(key)
end
def play(args, key, opts = {})
SOUNDS.fetch(key).play(args, opts) if args.state.setting.sfx
end
def stop(args, key)
SOUNDS.fetch(key).stop(args)
end
def pause(args, key)
SOUNDS.fetch(key).pause(args)
end
def resume(args, key)
SOUNDS.fetch(key).resume(args)
end
end
end