Acton common easing action

Hits: 0

/**
 * Author:W
 * The easing action of the node: it cannot exist alone, it is only used to "modify" the basic action, it can modify the time curve of the basic action,
 * let the action have fast in, slow in, fast out, etc. complex special effects. Easing actions are only supported for time interval actions. The common easing action reference table is as follows:
 * 
  * cc.easeIn creates easeIn easing object, from slow to fast
 * cc.easeOut creates easeOut easing object, from fast to slow
 * cc.easeInOut first from slow to fast, then from fast to slow
 * 
  * cc.easeExponentialIn
 * cc.easeExponentialOut
 * cc.easeExponentialInOut
 * 
  * cc.easeSineIn
 * cc.easeSineOut
 * cc.easeSineInOut
 * 
  * cc.easeElasticIn
 * cc.easeElasticOut
 * cc.easeElasticInOut
 * 
 * cc.easeBounceIn
 * cc.easeBounceOut
 * cc.easeBounceInOut
 * 
 * cc.easeBackIn
 * cc.easeBackOut
 * cc.easeBackInOut
 * 
 * cc.easeBezierAction
 * 
 * cc.easeQuadraticActionIn
 * cc.easeQuadraticActionOut
 * cc.easeQuadraticActionInOut
 * 
 * cc.easeQuarticActionIn
 * cc.easeQuarticActionOut
 * cc.easeQuarticActionInOut
 * 
 * cc.easeQuinticActionIn
 * cc.easeQuinticActionOut
 * cc.easeQuinticActionInOut
 * 
 * cc.easeCircleActionIn
 * cc.easeCircleActionOut
 * cc.easeCircleActionInOut
 * 
 * cc.easeCubicActionIn
 * cc.easeCubicActionOut
 * cc.easeCubicActionInOut
 * 
 */
cc.Class({
    extends: cc.Component,

    properties: {

    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {

    },

    start () {

        var action = cc.scaleTo(0.7,2,2); 
        //Add easing to the base action 
        action.easing(cc.easeIn(3));

        this.node.runAction(action);
    },

    update (dt) {

    },
});

You may also like...

Leave a Reply

Your email address will not be published.