Class: RGSS::TMX::MapObject
- Inherits:
-
Object
- Object
- RGSS::TMX::MapObject
- Defined in:
- lib/rgss/tilemap.rb
Instance Attribute Summary collapse
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
-
#initialize(node) ⇒ MapObject
constructor
A new instance of MapObject.
- #parse_color(value) ⇒ Object protected
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
#properties ⇒ Object (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 |