Class: RPG::BGM
Constant Summary
collapse
- @@last =
RPG::BGM.new
Instance Attribute Summary collapse
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
Instance Attribute Details
#pos ⇒ Object
Returns the value of attribute pos.
42
43
44
|
# File 'lib/rgss3/rpg.rb', line 42
def pos
@pos
end
|
Class Method Details
.fade(time) ⇒ Object
34
35
36
37
|
# File 'lib/rgss3/rpg.rb', line 34
def self.fade(time)
Audio.bgm_fade(time)
@@last = RPG::BGM.new
end
|
.last ⇒ Object
38
39
40
41
|
# File 'lib/rgss3/rpg.rb', line 38
def self.last
@@last.pos = Audio.bgm_pos
@@last
end
|
Instance Method Details
#play(pos = 0) ⇒ Object
18
19
20
21
22
23
24
25
26
|
# File 'lib/rgss3/rpg.rb', line 18
def play(pos = 0)
if @name.empty?
Audio.bgm_stop
@@last = RPG::BGM.new
else
Audio.bgm_play('Audio/BGM/' + @name, @volume, @pitch, pos)
@@last = self.clone
end
end
|
#replay ⇒ Object
27
28
29
|
# File 'lib/rgss3/rpg.rb', line 27
def replay
play(@pos)
end
|