Sha256: a0cb6c3c72d6ce17bcaee9ee5d9abed57344091d4d1b896b8e9f564bc4acc40d

Contents?: true

Size: 705 Bytes

Versions: 2

Compression:

Stored size: 705 Bytes

Contents

module Joybox
  module Actions

    class Repeat

      def self.defaults
        {
          action: nil,
          times: 0
        }
      end

      #TODO: Revisar esto, no estoy completamente seguro que deba de cambiar la implementacion
      #      original (nombre del metodo)
      def self.forever(options = {})
        options = options.nil? ? defaults : defaults.merge!(options)

        CCRepeatForever.actionWithAction(options[:action])
      end

      def self.with(options = {})
        options = options.nil? ? defaults : defaults.merge!(options)

        CCRepeat.actionWithAction(options[:action], 
                                  times:options[:times])
      end

    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
joybox-1.1.1 motion/joybox/actions/repeat.rb
joybox-1.1.0 motion/joybox/actions/repeat.rb