ccnode-find

0.0.1 • Public • Published

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);
    }
});

Readme

Keywords

none

Package Sidebar

Install

npm i ccnode-find

Weekly Downloads

1

Version

0.0.1

License

GPL-3.0

Unpacked Size

37.7 kB

Total Files

4

Last publish

Collaborators

  • jarvisjiang