Class: RPG::Area

Inherits:
Object
  • Object
show all
Extended by:
RgssDb::JsonableConstructor
Includes:
RgssDb::Jsonable
Defined in:
lib/rgss_db/model/rpg_maker_data/vx/rpg/area.rb

Overview

Data class for areas.

Instance Attribute 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

#initializeArea

Returns a new instance of Area.



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

def initialize
  @id = 0
  @name = ""
  @map_id = 0
  @rect = Rect.new(0, 0, 0, 0)
  @encounter_list = []
  @order = 0
end

Instance Attribute Details

#encounter_listObject

Returns the value of attribute encounter_list.



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

def encounter_list
  @encounter_list
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#map_idObject

Returns the value of attribute map_id.



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

def map_id
  @map_id
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#orderObject

Returns the value of attribute order.



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

def order
  @order
end

#rectObject

Returns the value of attribute rect.



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

def rect
  @rect
end

Instance Method Details

#to_sObject



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

def to_s
  @name.to_s
end