Class: RPG::ME

Inherits:
AudioFile show all
Defined in:
lib/rpg/me.rb

Instance Attribute Summary

Attributes inherited from AudioFile

#name, #pitch, #volume

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AudioFile

#initialize

Constructor Details

This class inherits a constructor from RPG::AudioFile

Class Method Details

.fade(time) ⇒ Object



13
14
15
# File 'lib/rpg/me.rb', line 13

def self.fade(time)
  Audio.me_fade(time)
end

.stopObject



10
11
12
# File 'lib/rpg/me.rb', line 10

def self.stop
  Audio.me_stop
end

Instance Method Details

#playObject



3
4
5
6
7
8
9
# File 'lib/rpg/me.rb', line 3

def play
  if @name.empty?
    Audio.me_stop
  else
    Audio.me_play('Audio/ME/' + @name, @volume, @pitch)
  end
end