ccc 播放动画

cc.Class({
    extends: cc.Component,

    properties: {
        anim:cc.Animation,
    },

    // use this for initialization
    onLoad: function () {

    },
    
    sheepJump:function()
    {
        this.anim.play("sheep-animation-jump")
    },
    
    sheepRun:function()
    {
        this.anim.play("sheep-animation-run")
    }

    // called every frame, uncomment this function to activate update callback
    // update: function (dt) {

    // },
});

posted @ 2016-04-20 13:33  yufenghou  阅读(144)  评论(0编辑  收藏  举报