Sha256: a186b834b6894ee58cbbe9c8259d4c714f011364d37b002acc8071bfa3154fd4
Contents?: true
Size: 747 Bytes
Versions: 2
Compression:
Stored size: 747 Bytes
Contents
module Joybox module Core class SpriteBatch < CCSpriteBatchNode extend Joybox::Common::Initialize def defaults { capacity: 29 } end def initialize(options = {}) options = options.nil? ? defaults : defaults.merge!(options) initialize_with_file_name(options) if options.has_key? (:file_name) initialize_with_texture(options) if options.has_key? (:texture) end private def initialize_with_file_name(options = {}) initWithFile(options[:file_name], capacity: options[:capacity]) end def initialize_with_texture(options = {}) initWithTexture(options[:texture], capacity: options[:capacity]) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
joybox-1.1.1 | motion/joybox/core/sprite_batch.rb |
joybox-1.1.0 | motion/joybox/core/sprite_batch.rb |