Class: DXRuby::Tiled::RectangleObject
- Defined in:
- lib/dxruby_tiled/object.rb
Instance Attribute Summary
Attributes inherited from TMEObject
#id, #name, #properties, #type
Class Method Summary collapse
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize(x, y, width, height, options = {}) ⇒ RectangleObject
constructor
A new instance of RectangleObject.
Constructor Details
#initialize(x, y, width, height, options = {}) ⇒ RectangleObject
Returns a new instance of RectangleObject.
71 72 73 74 75 76 |
# File 'lib/dxruby_tiled/object.rb', line 71 def initialize(x, y, width, height, = {}) [:width] = width [:height] = height super x, y, self.collision = [0, 0, @width, @height] end |
Class Method Details
.create_from_hash(hash) ⇒ Object
67 68 69 |
# File 'lib/dxruby_tiled/object.rb', line 67 def self.create_from_hash(hash) self.new(hash[:x], hash[:y], hash[:width], hash[:height], hash) end |
Instance Method Details
#draw ⇒ Object
78 |
# File 'lib/dxruby_tiled/object.rb', line 78 def draw; end |