Class: RGSS::TMX::MapObject

Inherits:
Object
  • Object
show all
Defined in:
lib/rgss/tilemap.rb

Direct Known Subclasses

Map, Tileset

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ MapObject

Returns a new instance of MapObject.



11
12
13
# File 'lib/rgss/tilemap.rb', line 11

def initialize(node)

end

Instance Attribute Details

#propertiesObject (readonly)

Returns the value of attribute properties.



9
10
11
# File 'lib/rgss/tilemap.rb', line 9

def properties
  @properties
end

Instance Method Details

#parse_color(value) ⇒ Object (protected)



17
18
19
20
21
# File 'lib/rgss/tilemap.rb', line 17

def parse_color(value)
  return Color::NONE unless value
  c = value.sub(/^#/, '').scan(/../).map { |a| a.to_i(16) / 255.0 }
  Color.new(c[1], c[2], c[3], c[0])
end