Sha256: a815c6d821521bcf4eb3bfa151cba1e2acfda2104ca9c8277063994a8b48f1b1

Contents?: true

Size: 640 Bytes

Versions: 5

Compression:

Stored size: 640 Bytes

Contents

module Joybox
  module Actions

    class Skew

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

      def self.by(options = {})

        options = options.nil? ? defaults : defaults.merge!(options)

        CCSkewBy.actionWithDuration(options[:duration], 
          skewX: options[:x],
          skewY: options[:y])
      end


      def self.to(options = {})

        options = options.nil? ? defaults : defaults.merge!(options)

        CCSkewTo.actionWithDuration(options[:duration], 
          skewX: options[:x],
          skewY: options[:y])
      end

    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
joybox-1.0.0 motion/joybox/actions/skew.rb
joybox-0.0.6 motion/joybox/actions/skew.rb
joybox-0.0.5 lib/joybox/cocos2d/actions/skew.rb
joybox-0.0.4 lib/joybox/cocos2d/actions/skew.rb
joybox-0.0.3 lib/joybox/cocos2d/actions/skew.rb