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.
1411
1412
1413
|
# File 'lib/R3EXS/RGSS3.rb', line 1411
def pos
@pos
end
|
Class Method Details
.fade(time) ⇒ Object
1401
1402
1403
1404
|
# File 'lib/R3EXS/RGSS3.rb', line 1401
def self.fade(time)
Audio.bgm_fade(time)
@@last = RPG::BGM.new
end
|
.last ⇒ Object
1406
1407
1408
1409
|
# File 'lib/R3EXS/RGSS3.rb', line 1406
def self.last
@@last.pos = Audio.bgm_pos
@@last
end
|
.stop ⇒ Object
1396
1397
1398
1399
|
# File 'lib/R3EXS/RGSS3.rb', line 1396
def self.stop
Audio.bgm_stop
@@last = RPG::BGM.new
end
|
Instance Method Details
#play(pos = 0) ⇒ Object
1382
1383
1384
1385
1386
1387
1388
1389
1390
|
# File 'lib/R3EXS/RGSS3.rb', line 1382
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
1392
1393
1394
|
# File 'lib/R3EXS/RGSS3.rb', line 1392
def replay
play(@pos)
end
|