Class: DXRuby::Tiled::ObjectGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/dxruby_tiled/objectgroup.rb

Overview

unsupported

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (readonly)

Returns the value of attribute data.



4
5
6
# File 'lib/dxruby_tiled/objectgroup.rb', line 4

def data
  @data
end

#heightObject (readonly)

Returns the value of attribute height.



4
5
6
# File 'lib/dxruby_tiled/objectgroup.rb', line 4

def height
  @height
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/dxruby_tiled/objectgroup.rb', line 4

def name
  @name
end

#offset_xObject

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_yObject

Returns the value of attribute offset_y.



5
6
7
# File 'lib/dxruby_tiled/objectgroup.rb', line 5

def offset_y
  @offset_y
end

#opacityObject

Returns the value of attribute opacity.



5
6
7
# File 'lib/dxruby_tiled/objectgroup.rb', line 5

def opacity
  @opacity
end

#propertiesObject (readonly)

Returns the value of attribute properties.



4
5
6
# File 'lib/dxruby_tiled/objectgroup.rb', line 4

def properties
  @properties
end

#visibleObject

Returns the value of attribute visible.



5
6
7
# File 'lib/dxruby_tiled/objectgroup.rb', line 5

def visible
  @visible
end

#widthObject (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