ccc 碰撞初步

cc.Class({
    extends: cc.Component,

    properties: {

    },

    // use this for initialization
    onLoad: function () {
        var manager=cc.director.getCollisionManager();
        manager.enabled=true;
        manager.enabledDebugDraw = true;
        manager.enabledDrawBoundingBox = true;
        
    },

    onCollisionEnter: function (other, self) {
        console.log('on collision enter');

    },

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

    // },
});

posted @ 2016-05-29 12:29  yufenghou  阅读(195)  评论(0编辑  收藏  举报