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B,YAAY","file":"","sourceRoot":"/","sourcesContent":["\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\nexport default class BreathAction extends cc.Component {\n\n @property\n speed: number = 1;\n @property\n opacityMax: number = 255;\n @property\n opacityMin: number = 0;\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 this.node.stopAllActions();\n this.node.runAction(cc.repeatForever(cc.sequence(fadeInAct, fadeOutAct)));\n }\n\n onDisable() {\n this.node.stopAllActions();\n this.node.opacity = this.opacityMax;\n }\n\n\n\n update(dt) { }\n}\n"]}