Cocos creator 设置左下角默认隐藏并且修改颜色和scale

// const randomInt = (min = 0, max = 10) => {
            //     return (Math.random() * (max - min) + min) | 0;
            // };
            // const randomColor = () => {
            //     return new cc.Color(randomInt(0, 255), randomInt(0, 255), randomInt(0, 255));
            // };
            // const _randomColorObj = randomColor()
            const _randomColorObj = new cc.Color( 0,  0,  0);

            this.getProfileNode().then((node)=>{
                node.scale = 1.5
                node.children[0].color = _randomColorObj
                node.children[1].color = _randomColorObj
                cc.debug.setDisplayStats(false);
            })

getProfileNode() {
            return new Promise((resolve, reject) => {
                let id = setInterval(() => {
                    let profileNode = cc.find("PROFILER-NODE")
                    if (profileNode) {
                        resolve(profileNode);
                        clearInterval(id);
                    }
                }, 500);

            });
        },

推荐阅读更多精彩内容