lib/cocoa/sugarcube-spritekit/sknode.rb in sugarcube-2.8.2 vs lib/cocoa/sugarcube-spritekit/sknode.rb in sugarcube-2.9.1
- old
+ new
@@ -2,10 +2,22 @@
def <<(node)
addChild(node)
end
+ def run_action(action, &completion)
+ runAction(action, completion: completion)
+ end
+
+ def [](key)
+ userData[key]
+ end
+
+ def []=(key, value)
+ userData[key] = value
+ end
+
def to_s
- "#<#{self.class}:0x#{self.object_id.to_s(16)} position=#{position.inspect}>"
+ "#<#{self.class}:0x#{self.object_id.to_s(16)} position=#{position.inspect} name=#{name.inspect}>"
end
end