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,KAAK,EAAE;iBACpB,EAAE,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;iBACzD,EAAE,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;iBAC3D,KAAK,EAAE,CAAC;YACb,IAAI,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;YAChE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACpC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aACvD;YACD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QACzD,CAAC;KAEJ,CAAA;IA/BG;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;6CACQ;IAE3B;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;gDACW;IALZ,UAAU;QAD9B,OAAO;OACa,UAAU,CAkC9B;IAAD,iBAAC;KAAA;kBAlCoB,UAAU","file":"","sourceRoot":"/","sourcesContent":["import { DummyLabel, DummyNode } from \"../../common/CCDummyObjects\";\nimport { GameModelManager } from \"../model/GameModelManager\";\n\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\nexport default class ChapterBtn extends cc.Component {\n\n @property(cc.Label)\n private label = DummyLabel;\n @property(cc.Node)\n private pointSpr = DummyNode;\n\n private _pid: number = -1;\n\n setData(chapterId: number, chapterName: number, pid: number) {\n this._pid = pid;\n this.label.string = chapterId.toString() + \".\" + GameModelManager.getI18LanguageTxt(chapterName);\n }\n\n onItemClick() {\n console.log(\"onItemClick pid = \", this._pid);\n GameModelManager.RollBackToPlot.emit(this._pid);\n let sprites = this.node.parent.getComponentsInChildren(cc.Sprite);\n for (let i = 0; i < sprites.length; i++) {\n sprites[i].node.active = false;\n }\n this.pointSpr.active = true;\n cc.tween(this.pointSpr)\n .repeatForever(cc.tween()\n .to(0.5, { scale: 1.15, x: -25 }, { easing: 'sineInOut' })\n .to(0.5, { scale: 1, x: -30 }, { easing: 'sineInOut' }))\n .start();\n let labels = this.node.parent.getComponentsInChildren(cc.Label);\n for (let i = 0; i < labels.length; i++) {\n labels[i].node.color = cc.color(255, 255, 255, 255);\n }\n this.label.node.color = cc.color(255, 238, 149, 255);\n }\n\n}\n"]}