Method: Table#initialize
- Defined in:
-
lib/rgss_db/model/rpg_maker_data/vx/rgss/table.rb,
lib/rgss_db/model/rpg_maker_data/xp/rgss/table.rb,
lib/rgss_db/model/rpg_maker_data/vx_ace/rgss/table.rb
Creates a Table object.
Specifies the size of each dimension in the multidimensional array. 1-, 2-, and 3-dimensional arrays are possible.
Arrays with no parameters are also permitted.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/rgss_db/model/rpg_maker_data/vx/rgss/table.rb', line 23 def initialize(xsize, ysize = 0, zsize = 0) # RMXP needs dimensions @dim = 1 @dim = 2 if ysize.positive? @dim = 3 if zsize.positive? @x = xsize @y = ysize @z = zsize @data = [] end |