Class: RPG::BGS

Inherits:
AudioFile show all
Defined in:
lib/R3EXS/RGSS3.rb

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

Methods inherited from AudioFile

#initialize

Constructor Details

This class inherits a constructor from RPG::AudioFile

Instance Attribute Details

#posObject

Returns the value of attribute pos.



1446
1447
1448
# File 'lib/R3EXS/RGSS3.rb', line 1446

def pos
  @pos
end

Class Method Details

.fade(time) ⇒ Object



1436
1437
1438
1439
# File 'lib/R3EXS/RGSS3.rb', line 1436

def self.fade(time)
    Audio.bgs_fade(time)
    @@last = RPG::BGS.new
end

.lastObject



1441
1442
1443
1444
# File 'lib/R3EXS/RGSS3.rb', line 1441

def self.last
    @@last.pos = Audio.bgs_pos
    @@last
end

.stopObject



1431
1432
1433
1434
# File 'lib/R3EXS/RGSS3.rb', line 1431

def self.stop
    Audio.bgs_stop
    @@last = RPG::BGS.new
end

Instance Method Details

#play(pos = 0) ⇒ Object



1417
1418
1419
1420
1421
1422
1423
1424
1425
# File 'lib/R3EXS/RGSS3.rb', line 1417

def play(pos = 0)
    if @name.empty?
        Audio.bgs_stop
        @@last = RPG::BGS.new
    else
        Audio.bgs_play('Audio/BGS/' + @name, @volume, @pitch, pos)
        @@last = self.clone
    end
end

#replayObject



1427
1428
1429
# File 'lib/R3EXS/RGSS3.rb', line 1427

def replay
    play(@pos)
end