Class: RPG::AudioFile

Inherits:
Object
  • Object
show all
Extended by:
RgssDb::JsonableConstructor
Includes:
RgssDb::Jsonable
Defined in:
lib/rgss_db/model/rpg_maker_data/vx/rpg/audio_file.rb,
lib/rgss_db/model/rpg_maker_data/xp/rpg/audio_file.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/audio_file.rb

Overview

A superclass of BGM, BGS, ME, and SE.

Direct Known Subclasses

BGM, BGS, ME, SE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RgssDb::JsonableConstructor

json_create, json_new

Methods included from RgssDb::Jsonable

#as_json, #to_json

Constructor Details

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

Returns a new instance of AudioFile.



11
12
13
14
15
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/audio_file.rb', line 11

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

Instance Attribute Details

#nameObject

Returns the value of attribute name.



21
22
23
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/audio_file.rb', line 21

def name
  @name
end

#pitchObject

Returns the value of attribute pitch.



21
22
23
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/audio_file.rb', line 21

def pitch
  @pitch
end

#volumeObject

Returns the value of attribute volume.



21
22
23
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/audio_file.rb', line 21

def volume
  @volume
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/audio_file.rb', line 17

def to_s
  @name.to_s
end