Class: RPG::BGS
Overview
The data class for BGS. This class has functionality for playing itself using an Audio module.
Constant Summary
collapse
- @@last =
RPG::BGS.new
Instance Attribute Summary collapse
Attributes inherited from AudioFile
#name, #pitch, #volume
Class Method Summary
collapse
Instance Method Summary
collapse
json_create, json_new
#as_json, #to_json
Methods inherited from AudioFile
#initialize, #to_s
Constructor Details
This class inherits a constructor from RPG::AudioFile
Instance Attribute Details
#pos ⇒ Object
Returns the value of attribute pos.
41
42
43
|
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/bgs.rb', line 41
def pos
@pos
end
|
Class Method Details
.fade(time) ⇒ Object
27
28
29
30
|
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/bgs.rb', line 27
def self.fade(time)
Audio.bgs_fade(time)
@@last = BGS.new
end
|
.last ⇒ Object
32
33
34
|
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/bgs.rb', line 32
def self.last
@@last
end
|
.stop ⇒ Object
22
23
24
25
|
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/bgs.rb', line 22
def self.stop
Audio.bgs_stop
@@last = BGS.new
end
|
Instance Method Details
#play(pos = 0) ⇒ Object
12
13
14
15
16
17
18
19
20
|
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/bgs.rb', line 12
def play
if @name.empty?
Audio.bgs_stop
@@last = BGS.new
else
Audio.bgs_play("Audio/BGS/" + @name, @volume, @pitch)
@@last = self
end
end
|
#replay ⇒ Object
22
23
24
|
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/bgs.rb', line 22
def replay
play(@pos)
end
|