ccc animation

cc.Class({
    extends: cc.Component,

    properties: {
        sheepAnim: {
            default: null,
            type: cc.Animation
        }

    },

    // use this for initialization
    onLoad: function () {
        var anim = this.sheepAnim;
        setTimeout(function() {
            anim.play('sheep_jump');
        }, 2000);
    },

    // called every frame
    update: function (dt) {

    },
});

原文地址:https://www.cnblogs.com/yufenghou/p/5406460.html