Class: DXRubyRP5::SoundEffect

Inherits:
Object
  • Object
show all
Defined in:
lib/dxruby_rp5/sound_effect.rb

Instance Method Summary collapse

Constructor Details

#initialize(time, wavetype = WAVE_RECT, resolution = 1000) ⇒ SoundEffect

Returns a new instance of SoundEffect.



4
5
6
7
8
# File 'lib/dxruby_rp5/sound_effect.rb', line 4

def initialize(time, wavetype = WAVE_RECT, resolution = 1000)
  @time = time

  @time.times { yield }
end

Instance Method Details

#add(wavetype = WAVE_RECT, resolution = 1000) ⇒ Object



10
11
12
# File 'lib/dxruby_rp5/sound_effect.rb', line 10

def add(wavetype = WAVE_RECT, resolution = 1000)
  @time.times { yield }
end

#playObject



14
15
# File 'lib/dxruby_rp5/sound_effect.rb', line 14

def play
end

#stopObject



17
18
# File 'lib/dxruby_rp5/sound_effect.rb', line 17

def stop
end