Sha256: 6a7dbf43150b7fa0ce8322f45c38c3cb237e7566393aeb3ade3b2785f78977cc
Contents?: true
Size: 609 Bytes
Versions: 2
Compression:
Stored size: 609 Bytes
Contents
module Joybox module Actions class Shuffle def self.defaults { duration: 0.3 } end def self.with(options = {}) # Todo print error message on the console return unless options.has_key? :grid_size options = options.nil? ? defaults : defaults.merge!(options) seed = options.delete(:seed) || Joybox.generate_seed CCShuffleTiles.actionWithDuration(options[:duration], size: options[:grid_size], seed: seed) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
joybox-1.1.1 | motion/joybox/actions/shuffle.rb |
joybox-1.1.0 | motion/joybox/actions/shuffle.rb |