Class: RPG::SE

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

Overview

The data class for SE. 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

.stopObject



17
18
19
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/se.rb', line 17

def self.stop
  Audio.se_stop
end

Instance Method Details

#playObject



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

def play
  return if @name.empty?

  Audio.se_play("Audio/SE/" + @name, @volume, @pitch)
end