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.



1424
1425
1426
# File 'lib/R3EXS/RGSS3.rb', line 1424

def pos
  @pos
end

Class Method Details

.fade(time) ⇒ Object



1414
1415
1416
1417
# File 'lib/R3EXS/RGSS3.rb', line 1414

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

.lastObject



1419
1420
1421
1422
# File 'lib/R3EXS/RGSS3.rb', line 1419

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

.stopObject



1409
1410
1411
1412
# File 'lib/R3EXS/RGSS3.rb', line 1409

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

Instance Method Details

#play(pos = 0) ⇒ Object



1395
1396
1397
1398
1399
1400
1401
1402
1403
# File 'lib/R3EXS/RGSS3.rb', line 1395

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



1405
1406
1407
# File 'lib/R3EXS/RGSS3.rb', line 1405

def replay
    play(@pos)
end