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AC,cAAc,EAAE,CAAC;YAC3B,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;YAC3B,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;QAC/B,CAAC;QAID,MAAM,CAAC,EAAE,IAAI,CAAC;KACjB,CAAA;IApCG;QADC,QAAQ;6CACS;IAElB;QADC,QAAQ;+CACW;IAEpB;QADC,QAAQ;+CACW;IAEpB;QADC,QAAQ;gDACY;IAErB;QADC,QAAQ;gDACY;IAXJ,UAAU;QAD9B,OAAO;OACa,UAAU,CAuC9B;IAAD,iBAAC;KAAA;kBAvCoB,UAAU","file":"","sourceRoot":"/","sourcesContent":["\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\nexport default class MoveAction extends cc.Component {\n\n @property\n speed: number = 1;\n @property\n srcPosX: number = 0;\n @property\n srcPosY: number = 0;\n @property\n tempPosX: number = 0;\n @property\n tempPosY: 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 ease = cc.easeSineInOut();\n let tempAct = cc.moveTo(actTime, cc.v2(this.tempPosX, this.tempPosY)).easing(ease);\n let srcAct = cc.moveTo(actTime, cc.v2(this.srcPosX, this.srcPosY)).easing(ease);\n this.node.stopAllActions();\n this.node.runAction(cc.repeatForever(cc.sequence(tempAct, srcAct)));\n }\n\n onDisable() {\n this.node.stopAllActions();\n this.node.x = this.srcPosX;\n this.node.y = this.srcPosY;\n }\n\n\n\n update(dt) { }\n}\n"]}