Class: RPG::AudioFile

Inherits:
Object
  • Object
show all
Defined in:
lib/rpg/audio_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = "", volume = 100, pitch = 100) ⇒ AudioFile

Returns a new instance of AudioFile.



13
14
15
16
17
# File 'lib/rpg/audio_file.rb', line 13

def initialize(name = "", volume = 100, pitch = 100)
  @name = name
  @volume = volume
  @pitch = pitch
end

Instance Attribute Details

#nameObject

The sound file name.



4
5
6
# File 'lib/rpg/audio_file.rb', line 4

def name
  @name
end

#pitchObject

The sound’s pitch (50..150). The default value is 100.



11
12
13
# File 'lib/rpg/audio_file.rb', line 11

def pitch
  @pitch
end

#volumeObject

The sound’s volume (0..100). The default values are 100 for BGM and ME and 80 for BGS and SE.



8
9
10
# File 'lib/rpg/audio_file.rb', line 8

def volume
  @volume
end