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C;QAC5F,CAAC;KAiBJ,CAAA;IA3DG;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;uDACsB;IAEzC;QADC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC;0DAC0B;IAE9C;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;yDACwB;IAG3C;QADC,QAAQ,CAAC,EAAE,CAAC,WAAW,CAAC;2DACoB;IAE7C;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;uDACsB;IAZhC,gBAAgB;QAF5B,OAAO;QACP,mCAAU,CAAC,wCAAmB,CAAC;OACnB,gBAAgB,CA8D5B;IAAD,uBAAC;KAAA;AA9DY,4CAAgB","file":"","sourceRoot":"/","sourcesContent":["import { DummyLabel, DummySprite } from \"../../../../common/CCDummyObjects\";\nimport { CCPureSubview } from \"../../../../common/classbase/CCViewBase\";\nimport { RegSubview } from \"../../PresenterCCViewFactory\";\nimport { MainInfoSubviewProps, MainInfoSubviewType } from \"../type/MainInfoSubviewiew\";\n\nconst { ccclass, property } = cc._decorator;\n\n\n\n\n@ccclass\n@RegSubview(MainInfoSubviewType)\nexport class MainInfoViewImpl extends CCPureSubview<MainInfoSubviewProps> {\n //#region editor bindings\n @property(cc.Label)\n private timeLabel: cc.Label = DummyLabel;\n @property(cc.Sprite)\n private energySprite: cc.Sprite = DummySprite;\n @property(cc.Label)\n private energyLabel: cc.Label = DummyLabel;\n\n @property(cc.SpriteFrame)\n private energySprites: cc.SpriteFrame[] = [];\n @property(cc.Label)\n private coolddown: cc.Label = DummyLabel;\n //#endregion\n\n\n\n onLoad() {\n this.updateTime();\n this.energySprite.type = cc.Sprite.Type.FILLED;\n this.energySprite.fillType = cc.Sprite.FillType.VERTICAL;\n\n this.bindProp(\"energycontent\", (value) => {\n this.energyLabel.string = value;\n });\n\n this.bindProp(\"timecontent\", (value) => {\n if (value === \"\") {\n this.coolddown.node.active = false;\n } else {\n this.coolddown.node.active = true;\n this.coolddown.string = value;\n }\n });\n\n this.bindProp(\"energybackindex\", (value) => {\n this.energySprite.spriteFrame = this.energySprites[value];\n });\n\n this.bindProp(\"energy\", (value) => {\n this.energySprite.fillRange = value;\n });\n\n this.energySprite.node.on(cc.Node.EventType.TOUCH_END, this.onEnergyClickCallback, this);\n this.energyLabel.node.on(cc.Node.EventType.TOUCH_END, this.onEnergyClickCallback, this);\n }\n\n\n\n onEnergyClickCallback = () => {\n this._props.onClick();\n }\n\n private updateTime = () => {\n let now = new Date;\n this.timeLabel.string = `${now.getHours()}:${(now.getMinutes() < 10 ? '0' : '') + now.getMinutes()}`;\n this.scheduleOnce(() => {\n this.scheduleOnce(this.updateTime, 60 - now.getSeconds());\n });\n }\n\n\n}"]}