Sha256: 41a402ece3bd404eba9a5b02b454d807efdf8384db65ae8b8a01f0f5b06baff3

Contents?: true

Size: 638 Bytes

Versions: 2

Compression:

Stored size: 638 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.0.0 motion/joybox/actions/rotate.rb
joybox-0.0.6 motion/joybox/actions/rotate.rb