Class: RPG::Map

Inherits:
Object
  • Object
show all
Defined in:
lib/rpg/map.rb,
lib/rpg/map/encounter.rb

Defined Under Namespace

Classes: Encounter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(width, height) ⇒ Map

Returns a new instance of Map.



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/rpg/map.rb', line 3

def initialize(width, height)
  @display_name = ''
  @tileset_id = 1
  @width = width
  @height = height
  @scroll_type = 0
  @specify_battleback = false
  @battleback_floor_name = ''
  @battleback_wall_name = ''
  @autoplay_bgm = false
  @bgm = RPG::BGM.new
  @autoplay_bgs = false
  @bgs = RPG::BGS.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
  @note = ''
  @data = Table.new(width, height, 4)
  @events = {}
end

Instance Attribute Details

#autoplay_bgmObject

Returns the value of attribute autoplay_bgm.



37
38
39
# File 'lib/rpg/map.rb', line 37

def autoplay_bgm
  @autoplay_bgm
end

#autoplay_bgsObject

Returns the value of attribute autoplay_bgs.



39
40
41
# File 'lib/rpg/map.rb', line 39

def autoplay_bgs
  @autoplay_bgs
end

#battleback1_nameObject

Returns the value of attribute battleback1_name.



35
36
37
# File 'lib/rpg/map.rb', line 35

def battleback1_name
  @battleback1_name
end

#battleback2_nameObject

Returns the value of attribute battleback2_name.



36
37
38
# File 'lib/rpg/map.rb', line 36

def battleback2_name
  @battleback2_name
end

#bgmObject

Returns the value of attribute bgm.



38
39
40
# File 'lib/rpg/map.rb', line 38

def bgm
  @bgm
end

#bgsObject

Returns the value of attribute bgs.



40
41
42
# File 'lib/rpg/map.rb', line 40

def bgs
  @bgs
end

#dataObject

Returns the value of attribute data.



51
52
53
# File 'lib/rpg/map.rb', line 51

def data
  @data
end

#disable_dashingObject

Returns the value of attribute disable_dashing.



41
42
43
# File 'lib/rpg/map.rb', line 41

def disable_dashing
  @disable_dashing
end

#display_nameObject

Returns the value of attribute display_name.



29
30
31
# File 'lib/rpg/map.rb', line 29

def display_name
  @display_name
end

#encounter_listObject

Returns the value of attribute encounter_list.



42
43
44
# File 'lib/rpg/map.rb', line 42

def encounter_list
  @encounter_list
end

#encounter_stepObject

Returns the value of attribute encounter_step.



43
44
45
# File 'lib/rpg/map.rb', line 43

def encounter_step
  @encounter_step
end

#eventsObject

Returns the value of attribute events.



52
53
54
# File 'lib/rpg/map.rb', line 52

def events
  @events
end

#heightObject

Returns the value of attribute height.



32
33
34
# File 'lib/rpg/map.rb', line 32

def height
  @height
end

#noteObject

Returns the value of attribute note.



50
51
52
# File 'lib/rpg/map.rb', line 50

def note
  @note
end

#parallax_loop_xObject

Returns the value of attribute parallax_loop_x.



45
46
47
# File 'lib/rpg/map.rb', line 45

def parallax_loop_x
  @parallax_loop_x
end

#parallax_loop_yObject

Returns the value of attribute parallax_loop_y.



46
47
48
# File 'lib/rpg/map.rb', line 46

def parallax_loop_y
  @parallax_loop_y
end

#parallax_nameObject

Returns the value of attribute parallax_name.



44
45
46
# File 'lib/rpg/map.rb', line 44

def parallax_name
  @parallax_name
end

#parallax_showObject

Returns the value of attribute parallax_show.



49
50
51
# File 'lib/rpg/map.rb', line 49

def parallax_show
  @parallax_show
end

#parallax_sxObject

Returns the value of attribute parallax_sx.



47
48
49
# File 'lib/rpg/map.rb', line 47

def parallax_sx
  @parallax_sx
end

#parallax_syObject

Returns the value of attribute parallax_sy.



48
49
50
# File 'lib/rpg/map.rb', line 48

def parallax_sy
  @parallax_sy
end

#scroll_typeObject

Returns the value of attribute scroll_type.



33
34
35
# File 'lib/rpg/map.rb', line 33

def scroll_type
  @scroll_type
end

#specify_battlebackObject

Returns the value of attribute specify_battleback.



34
35
36
# File 'lib/rpg/map.rb', line 34

def specify_battleback
  @specify_battleback
end

#tileset_idObject

Returns the value of attribute tileset_id.



30
31
32
# File 'lib/rpg/map.rb', line 30

def tileset_id
  @tileset_id
end

#widthObject

Returns the value of attribute width.



31
32
33
# File 'lib/rpg/map.rb', line 31

def width
  @width
end