Class: NEXXT::Parser::MapFile::Metatile

Inherits:
Object
  • Object
show all
Defined in:
lib/nexxt/parser/map_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(upper_left, upper_right, lower_left, lower_right, attribute) ⇒ Metatile

Returns a new instance of Metatile.



83
84
85
86
87
88
89
# File 'lib/nexxt/parser/map_file.rb', line 83

def initialize(upper_left, upper_right, lower_left, lower_right, attribute)
  @upper_left = upper_left
  @upper_right = upper_right
  @lower_left = lower_left
  @lower_right = lower_right
  @attribute = attribute
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



81
82
83
# File 'lib/nexxt/parser/map_file.rb', line 81

def attribute
  @attribute
end

#lower_leftObject (readonly)

Returns the value of attribute lower_left.



81
82
83
# File 'lib/nexxt/parser/map_file.rb', line 81

def lower_left
  @lower_left
end

#lower_rightObject (readonly)

Returns the value of attribute lower_right.



81
82
83
# File 'lib/nexxt/parser/map_file.rb', line 81

def lower_right
  @lower_right
end

#upper_leftObject (readonly)

Returns the value of attribute upper_left.



81
82
83
# File 'lib/nexxt/parser/map_file.rb', line 81

def upper_left
  @upper_left
end

#upper_rightObject (readonly)

Returns the value of attribute upper_right.



81
82
83
# File 'lib/nexxt/parser/map_file.rb', line 81

def upper_right
  @upper_right
end

Instance Method Details

#to_aObject



91
92
93
94
95
96
97
98
99
# File 'lib/nexxt/parser/map_file.rb', line 91

def to_a
  [
    upper_left,
    upper_right,
    lower_left,
    lower_right,
    attribute
  ]
end