class Game::Sound
- Game::Sound
- Reference
- Object
Defined in:
game/sound.crConstant Summary
-
DEBUG =
false
Constructors
Class Method Summary
- .load(name : String, filename : String, volume : Float32 | Nil, pitch : Float32 | Nil)
- .load(sounds : Array(NamedTuple(name: String, filename: String, volume: Float32 | Nil, pitch: Float32 | Nil)))
- .pause(sound : LibRay::Sound)
- .pitch(sound : LibRay::Sound, value : Float32)
- .play(sound : LibRay::Sound)
- .playing?(sound : LibRay::Sound)
- .resume(sound : LibRay::Sound)
- .stop(sound : LibRay::Sound)
- .unload(sound : LibRay::Sound)
- .unload_all
- .volume(sound : LibRay::Sound, value : Float32)
Instance Method Summary
- #load(filename : String)
- #pause
- #pitch : Float32
- #pitch=(value : Float32)
- #play
- #playing?
- #randomize_pitch(min : Float32 = 0.5_f32, max : Float32 = 1.5_f32)
- #randomize_volume(min : Float32 = 0.5_f32, max : Float32 = 1.5_f32)
- #resume
- #sound : LibRay::Sound
- #stop
- #unload
- #volume : Float32
- #volume=(value : Float32)
Constructor Detail
Class Method Detail
def self.load(name : String, filename : String, volume : Float32 | Nil, pitch : Float32 | Nil)
#
def self.load(sounds : Array(NamedTuple(name: String, filename: String, volume: Float32 | Nil, pitch: Float32 | Nil)))
#