Sha256: dab9b1a30bc6c48208d04837169f30d6804f14dfff237e30432c956d307a08dd

Contents?: true

Size: 555 Bytes

Versions: 2

Compression:

Stored size: 555 Bytes

Contents

module Joybox
  module Actions

    class Rotate

      def self.defaults
        {
          duration: 0.3,
          angle: 0
        }
      end

      def self.by(options = {})
        options = options.nil? ? defaults : defaults.merge!(options)
        CCRotateBy.actionWithDuration(options[:duration], angle: options[:angle])
      end

      def self.to(options = {})
        options = options.nil? ? defaults : defaults.merge!(options)
        CCRotateTo.actionWithDuration(options[:duration], angle: options[:angle])
      end

    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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