RPG::Map
Data class for maps.
Superclass
Attributes
tileset_id
Tileset ID to be used in the map.
width
The map width.
height
The map height.
autoplay_bgm
Truth-value of whether BGM autoswitching is enabled.
bgm
If BGM autoswitching is enabled, the name of that BGM (RPG::AudioFile).
autoplay_bgs
Truth-value of whether BGS autoswitching is enabled.
bgs
If BGS autoswitching is enabled, the name of that BGS (RPG::AudioFile).
encounter_list
Encounter list. A troop ID array.
encounter_step
Number of steps between encounters.
data
The map data. A 3-dimensional tile ID array (Table).
events
Map events. A hash that represents RPG::Event instances as values, using event IDs as the keys.
Definition
module RPG
  class Map
    def initialize(width, height)
      @tileset_id = 1
      @width = width
      @height = height
      @autoplay_bgm = false
      @bgm = RPG::AudioFile.new
      @autoplay_bgs = false
      @bgs = RPG::AudioFile.new("", 80)
      @encounter_list = []
      @encounter_step = 30
      @data = Table.new(width, height, 3)
      @events = {}
    end
    attr_accessor :tileset_id
    attr_accessor :width
    attr_accessor :height
    attr_accessor :autoplay_bgm
    attr_accessor :bgm
    attr_accessor :autoplay_bgs
    attr_accessor :bgs
    attr_accessor :encounter_list
    attr_accessor :encounter_step
    attr_accessor :data
    attr_accessor :events
  end
endLast updated