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vC;YACD,IAAI,WAAW,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACzC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YAC3B,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;YAC1E,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;QACvF,CAAC;QAED,SAAS;YACL,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YAC3B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YAClC,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;QAC/B,CAAC;QAID,MAAM,CAAC,EAAE,IAAI,CAAC;KACjB,CAAA;IAnDG;QADC,QAAQ;mDACS;IAElB;QADC,QAAQ;wDACgB;IAEzB;QADC,QAAQ;wDACgB;IAEzB;QADC,QAAQ;oDACe;IAExB;QADC,QAAQ;sDACiB;IAE1B;QADC,QAAQ;qDACgB;IAbR,gBAAgB;QADpC,OAAO;OACa,gBAAgB,CAsDpC;IAAD,uBAAC;KAAA;kBAtDoB,gBAAgB","file":"","sourceRoot":"/","sourcesContent":["\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\nexport default class ItemBreathAction extends cc.Component {\n\n @property\n speed: number = 1;\n @property\n opacityMax: number = 255;\n @property\n opacityMin: number = 100;\n @property\n fixHua: boolean = false;\n @property\n fixQiang: boolean = false;\n @property\n fixBiao: boolean = false;\n\n\n private readonly _baseTime: number = 1;\n\n onLoad() { }\n\n start() {\n\n }\n\n onEnable() {\n let actTime: number = this._baseTime / this.speed;\n let fadeInAct = cc.fadeTo(actTime, this.opacityMax);\n let fadeOutAct = cc.fadeTo(actTime, this.opacityMin);\n let scaleInAct = cc.scaleTo(actTime, 1);\n if (this.fixHua) {\n scaleInAct = cc.scaleTo(actTime, 1.1);\n }\n if (this.fixQiang) {\n scaleInAct = cc.scaleTo(actTime, 1.5);\n }\n if (this.fixBiao) {\n scaleInAct = cc.scaleTo(actTime, 3);\n }\n let scaleOutAct = cc.scaleTo(actTime, 1);\n this.node.stopAllActions();\n this.node.runAction(cc.repeatForever(cc.sequence(fadeInAct, fadeOutAct)));\n this.node.parent.runAction(cc.repeatForever(cc.sequence(scaleInAct, scaleOutAct)));\n }\n\n onDisable() {\n this.node.stopAllActions();\n this.node.parent.stopAllActions();\n this.node.opacity = this.opacityMax;\n this.node.parent.scale = 1;\n }\n\n\n\n update(dt) { }\n}\n"]}