Class: RPG::Map

Inherits:
Object
  • Object
show all
Extended by:
RgssDb::JsonableConstructor
Includes:
RgssDb::Jsonable
Defined in:
lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb,
lib/rgss_db/model/rpg_maker_data/xp/rpg/map.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/map.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/map_encounter.rb

Overview

The data class for maps.

Defined Under Namespace

Classes: Encounter

Instance Attribute Summary collapse

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

Constructor Details

#initialize(width, height) ⇒ Map

Returns a new instance of Map.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 11

def initialize(width, height)
  @width = width
  @height = height
  @scroll_type = 0
  @autoplay_bgm = false
  @bgm = RPG::AudioFile.new
  @autoplay_bgs = false
  @bgs = RPG::AudioFile.new("", 80)
  @disable_dashing = false
  @encounter_list = []
  @encounter_step = 30
  @parallax_name = ""
  @parallax_loop_x = false
  @parallax_loop_y = false
  @parallax_sx = 0
  @parallax_sy = 0
  @parallax_show = false
  @data = Table.new(width, height, 3)
  @events = {}
end

Instance Attribute Details

#autoplay_bgmObject

Returns the value of attribute autoplay_bgm.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def autoplay_bgm
  @autoplay_bgm
end

#autoplay_bgsObject

Returns the value of attribute autoplay_bgs.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def autoplay_bgs
  @autoplay_bgs
end

#battleback1_nameObject

Returns the value of attribute battleback1_name.



53
54
55
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/map.rb', line 53

def battleback1_name
  @battleback1_name
end

#battleback2_nameObject

Returns the value of attribute battleback2_name.



53
54
55
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/map.rb', line 53

def battleback2_name
  @battleback2_name
end

#bgmObject

Returns the value of attribute bgm.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def bgm
  @bgm
end

#bgsObject

Returns the value of attribute bgs.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def bgs
  @bgs
end

#dataObject

Returns the value of attribute data.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def data
  @data
end

#disable_dashingObject

Returns the value of attribute disable_dashing.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def disable_dashing
  @disable_dashing
end

#display_nameObject

Returns the value of attribute display_name.



53
54
55
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/map.rb', line 53

def display_name
  @display_name
end

#encounter_listObject

Returns the value of attribute encounter_list.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def encounter_list
  @encounter_list
end

#encounter_stepObject

Returns the value of attribute encounter_step.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def encounter_step
  @encounter_step
end

#eventsObject

Returns the value of attribute events.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def events
  @events
end

#heightObject

Returns the value of attribute height.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def height
  @height
end

#noteObject

Returns the value of attribute note.



53
54
55
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/map.rb', line 53

def note
  @note
end

#parallax_loop_xObject

Returns the value of attribute parallax_loop_x.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def parallax_loop_x
  @parallax_loop_x
end

#parallax_loop_yObject

Returns the value of attribute parallax_loop_y.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def parallax_loop_y
  @parallax_loop_y
end

#parallax_nameObject

Returns the value of attribute parallax_name.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def parallax_name
  @parallax_name
end

#parallax_showObject

Returns the value of attribute parallax_show.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def parallax_show
  @parallax_show
end

#parallax_sxObject

Returns the value of attribute parallax_sx.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def parallax_sx
  @parallax_sx
end

#parallax_syObject

Returns the value of attribute parallax_sy.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def parallax_sy
  @parallax_sy
end

#scroll_typeObject

Returns the value of attribute scroll_type.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def scroll_type
  @scroll_type
end

#specify_battlebackObject

Returns the value of attribute specify_battleback.



53
54
55
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/map.rb', line 53

def specify_battleback
  @specify_battleback
end

#tileset_idObject

Returns the value of attribute tileset_id.



36
37
38
# File 'lib/rgss_db/model/rpg_maker_data/xp/rpg/map.rb', line 36

def tileset_id
  @tileset_id
end

#widthObject

Returns the value of attribute width.



43
44
45
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 43

def width
  @width
end

Class Method Details

.json_new(*args) ⇒ Object

JSON constructor

Parameters:

  • args (Array)

Returns:

  • Class instance



39
40
41
# File 'lib/rgss_db/model/rpg_maker_data/vx/rpg/map.rb', line 39

def self.json_new(*args)
  new(-1, -1)
end

Instance Method Details

#to_sObject



38
39
40
# File 'lib/rgss_db/model/rpg_maker_data/vx_ace/rpg/map.rb', line 38

def to_s
  @display_name.to_s
end