Class: DXRuby::Tiled::EllipseObject
- 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 = {}) ⇒ EllipseObject
constructor
A new instance of EllipseObject.
Constructor Details
#initialize(x, y, width, height, options = {}) ⇒ EllipseObject
Returns a new instance of EllipseObject.
86 87 88 89 90 91 92 |
# File 'lib/dxruby_tiled/object.rb', line 86 def initialize(x, y, width, height, = {}) [:width] = width [:height] = height super x, y, self.collision = [@width / 2.0, @width / 2.0, @width / 2.0] self.scale_y = 1.0 * @height / @width end |
Class Method Details
.create_from_hash(hash) ⇒ Object
82 83 84 |
# File 'lib/dxruby_tiled/object.rb', line 82 def self.create_from_hash(hash) self.new(hash[:x], hash[:y], hash[:width], hash[:height], hash) end |
Instance Method Details
#draw ⇒ Object
94 |
# File 'lib/dxruby_tiled/object.rb', line 94 def draw; end |