Class: RPG::ME

Inherits:
AudioFile show all
Extended by:
RgssDb::JsonableConstructor
Includes:
RgssDb::Jsonable
Defined in:
lib/rgss_db/model/rpg_maker_data/vx/rpg/me.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/me.rb

Overview

The data class for ME. This class has functionality for playing itself using an Audio module.

Instance Attribute Summary

Attributes inherited from AudioFile

#name, #pitch, #volume

Class Method Summary collapse

Instance Method Summary collapse

Methods included from RgssDb::JsonableConstructor

json_create, json_new

Methods included from RgssDb::Jsonable

#as_json, #to_json

Methods inherited from AudioFile

#initialize, #to_s

Constructor Details

This class inherits a constructor from RPG::AudioFile

Class Method Details

.fade(time) ⇒ Object



23
24
25
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/me.rb', line 23

def self.fade(time)
  Audio.me_fade(time)
end

.stopObject



19
20
21
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/me.rb', line 19

def self.stop
  Audio.me_stop
end

Instance Method Details

#playObject



11
12
13
14
15
16
17
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/me.rb', line 11

def play
  if @name.empty?
    Audio.me_stop
  else
    Audio.me_play("Audio/ME/" + @name, @volume, @pitch)
  end
end