rubyx-debugger/app/main/lib/object_view.rb
2015-07-13 23:11:00 +03:00

30 lines
488 B
Ruby

class ObjectView
attr_accessor :text , :object , :attributes
def initialize o
super()
self.text = PIXI::Text.new("no")
puts "NO O " unless o
self.object = o
self.text.text = o.object_id.to_s
@attributes = {}
end
def set name , val
@attributes[name] = val
end
def get(name)
@attributes[name]
end
def position
#raise "NONAME" unless self.text
self.text.position
end
def distance to
self.position - to.position
end
end