class DXRuby::Tiled::PolylineObject
Public Class Methods
create_from_hash(hash)
click to toggle source
# File lib/dxruby_tiled/object.rb, line 117 def self.create_from_hash(hash) self.new(hash[:x], hash[:y], hash[:polyline], hash) end
new(x, y, vertexs, options)
click to toggle source
Calls superclass method
DXRuby::Tiled::TMEObject::new
# File lib/dxruby_tiled/object.rb, line 121 def initialize(x, y, vertexs, options) super x, y, options collision = [] (vertexs.size - 2).times do |i| collision.push([vertexs[0 ][:x], vertexs[0 ][:y], vertexs[i + 1][:x], vertexs[i + 1][:y], vertexs[i + 2][:x], vertexs[i + 2][:y]]) end self.collision = collision end
Public Instance Methods
draw()
click to toggle source
# File lib/dxruby_tiled/object.rb, line 132 def draw; end