12345678910111213141516171819202122 |
- cc.Class({
- extends: cc.Component,
- properties: {
- },
- showPanel(data) {
- let content = cc.find("rootNode/layer_content2", this.node);
- for (let i = 0; i < content.children.length; i += 1) {
- let label = content.children[i].getComponent(cc.Label);
- label.string = ((data[i] / data.totalRound).toFixed(4) * 100).toFixed(2) + "%";
- }
- this.node.active = true;
- },
- closePanel() {
- this.node.parent.BCBMAudioManager.playButton();
- this.node.active = false;
- },
- });
|