0.0.1 • Published 6 years ago

ccnode-find v0.0.1

Weekly downloads
3
License
GPL-3.0
Repository
github
Last release
6 years ago

ccnode-find

扩展Cocos Creator的cc.Node,增加node.find方法。

Example

// auto polyfill
require('ccnode-find');

cc.Class({
    extends: cc.Component,

    onLoad() {
        const btn = this.node.find('btn');
        // 也可以传完整路径,跟cc.find一样
        const btn2 = this.node.find('path/to/btn');

        console.assert(btn === btn2);
    }
});