lib/joybox/cocos2d/core/sprite.rb in joybox-0.0.3 vs lib/joybox/cocos2d/core/sprite.rb in joybox-0.0.4

- old
+ new

@@ -14,9 +14,14 @@ sprite.position = options[:position] if options.has_key? (:position) sprite end + def file_name=(file_name) + + texture = CCTextureCache.sharedTextureCache.addImage(file_name) + self.setTexture(texture) + end private def self.new_with_file(options = {}) \ No newline at end of file