Commit 79787632 authored by liujiangnan's avatar liujiangnan

feat: 点击事件

parent 9bc9f8b7
...@@ -70,6 +70,9 @@ export default class NewClass extends cc.Component { ...@@ -70,6 +70,9 @@ export default class NewClass extends cc.Component {
if(reportType === 'pdtd') { if(reportType === 'pdtd') {
await this.drawPagePdtd(); await this.drawPagePdtd();
} }
if(reportType === 'qwqd') {
await this.drawPageQwqd();
}
if(reportType === 'ydjyz') { if(reportType === 'ydjyz') {
await this.drawPageYdjyz(); await this.drawPageYdjyz();
} }
...@@ -119,6 +122,18 @@ export default class NewClass extends cc.Component { ...@@ -119,6 +122,18 @@ export default class NewClass extends cc.Component {
// 激活索引为0的Level // 激活索引为0的Level
await this.drawPageItems(0); await this.drawPageItems(0);
} }
async drawPageQwqd() {
const node = cc.find("Canvas/learnreport");
cc.find("typeLabel", node).getComponent(cc.Label).string = reportObj[reportType];
// 设置每个级别激活状态(是否显示锁头)
for (let i = 1; i < 5; i++) {
cc.find(`level${i+1}/lock_1`, node).active = (i >= 3);
}
// 激活索引为0的Level
await this.drawPageItems(0);
}
clearnContent() { clearnContent() {
const node = cc.find("Canvas/learnreport"); const node = cc.find("Canvas/learnreport");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment