Class: DXRuby::Tiled::ObjectGroup
- Inherits:
-
Object
- Object
- DXRuby::Tiled::ObjectGroup
- Defined in:
- lib/dxruby_tiled/objectgroup.rb
Overview
unsupported
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#offset_x ⇒ Object
Returns the value of attribute offset_x.
-
#offset_y ⇒ Object
Returns the value of attribute offset_y.
-
#opacity ⇒ Object
Returns the value of attribute opacity.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#visible ⇒ Object
Returns the value of attribute visible.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
- #draw(x, y, target = DXRuby::Window) ⇒ Object
-
#initialize(data, map) ⇒ ObjectGroup
constructor
A new instance of ObjectGroup.
Constructor Details
#initialize(data, map) ⇒ ObjectGroup
Returns a new instance of ObjectGroup.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/dxruby_tiled/objectgroup.rb', line 7 def initialize(data, map) @original_data = data @map = map @name = data[:name] @color = data[:color] || [128, 128, 128] @opacity = data[:opacity] || 1 @visible = data[:visible] != false @offset_x = data[:offsetx] || 0 @offset_y = data[:offsety] || 0 @properties = data[:properties] || {} @draworder = data[:draworder] || "topdown" end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/dxruby_tiled/objectgroup.rb', line 4 def data @data end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
4 5 6 |
# File 'lib/dxruby_tiled/objectgroup.rb', line 4 def height @height end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/dxruby_tiled/objectgroup.rb', line 4 def name @name end |
#offset_x ⇒ Object
Returns the value of attribute offset_x.
5 6 7 |
# File 'lib/dxruby_tiled/objectgroup.rb', line 5 def offset_x @offset_x end |
#offset_y ⇒ Object
Returns the value of attribute offset_y.
5 6 7 |
# File 'lib/dxruby_tiled/objectgroup.rb', line 5 def offset_y @offset_y end |
#opacity ⇒ Object
Returns the value of attribute opacity.
5 6 7 |
# File 'lib/dxruby_tiled/objectgroup.rb', line 5 def opacity @opacity end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
4 5 6 |
# File 'lib/dxruby_tiled/objectgroup.rb', line 4 def properties @properties end |
#visible ⇒ Object
Returns the value of attribute visible.
5 6 7 |
# File 'lib/dxruby_tiled/objectgroup.rb', line 5 def visible @visible end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
4 5 6 |
# File 'lib/dxruby_tiled/objectgroup.rb', line 4 def width @width end |
Instance Method Details
#draw(x, y, target = DXRuby::Window) ⇒ Object
21 22 |
# File 'lib/dxruby_tiled/objectgroup.rb', line 21 def draw(x, y, target = DXRuby::Window) end |