Class: NEXXT::Parser::Map::Metatile

Inherits:
Object
  • Object
show all
Defined in:
lib/nexxt/parser/map.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.



87
88
89
90
91
92
93
# File 'lib/nexxt/parser/map.rb', line 87

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.



85
86
87
# File 'lib/nexxt/parser/map.rb', line 85

def attribute
  @attribute
end

#lower_leftObject (readonly)

Returns the value of attribute lower_left.



85
86
87
# File 'lib/nexxt/parser/map.rb', line 85

def lower_left
  @lower_left
end

#lower_rightObject (readonly)

Returns the value of attribute lower_right.



85
86
87
# File 'lib/nexxt/parser/map.rb', line 85

def lower_right
  @lower_right
end

#upper_leftObject (readonly)

Returns the value of attribute upper_left.



85
86
87
# File 'lib/nexxt/parser/map.rb', line 85

def upper_left
  @upper_left
end

#upper_rightObject (readonly)

Returns the value of attribute upper_right.



85
86
87
# File 'lib/nexxt/parser/map.rb', line 85

def upper_right
  @upper_right
end

Instance Method Details

#to_aObject



95
96
97
98
99
100
101
102
103
# File 'lib/nexxt/parser/map.rb', line 95

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