Skip to content

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

License

Notifications You must be signed in to change notification settings

JiangJie/ccnode-find

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages